Re: Best Practice with WW2.2.1 Crud / Validation / State Methods

Philip Luppens <[email protected]>
Newsgroups gmane.comp.java.open-symphony.webwork
Message-ID <1281819.1145353942594.JavaMail.os-j2ee@opensymphony01.managed.contegix.com>
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.