Re: Best Practice with WW2.2.1 Crud / Validation / State Methods
"Jason Carreira" <[email protected]>
| Newsgroups | gmane.comp.java.open-symphony.webwork |
|---|---|
| Message-ID | <[email protected]> |
It should also create a new Category item if the id is null... at least if you're using ModelDriven like the book does (I think) On 4/18/06, Philip Luppens <[email protected]> wrote: > > Peter, > > I haven't read 'Webwork in action' *bows head in shame*, but yes, that's > normally what you do in a prepare() method in your action; you set up a new > Category object - if an id is passed, load the object from the database, or > else create a new one. The actuall persistance operation would be in your > execute() method. > > Just make sure that you create a stack that lists .., params, prepare, > params, .. so the Category object you prepared will then be populated by > your request parameters (the first params is to set your id parameter). > > Cheers, > > Phil > --------------------------------------------------------------------- > Posted via Jive Forums > > http://forums.opensymphony.com/thread.jspa?threadID=24936&messageID=51815#51815 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >