Editing an entity in Struts2

2008-02-05 Thread GF
I want to edit an entity, i.e. a Message i would set the .jsp field this way s:textfield name=message.title / on the MessageAction i would have a edit method that takes the messageID and then call the business service to load the Message object, so in the .jsp the file the textfield are loaded

Re: Editing an entity in Struts2

2008-02-05 Thread Jeromy Evans
Loading an Entity in the prepare method is a common use-case. If you're allowing an Entity to be updated directly from the JSP you'll probably need the prepare-params-prepare (set params including entity's ID, params loads the existing entity, prepare sets the params on the entity instance)