I'm sorry, I can't make this work... I always get an empty form! Can you send me 2 <action> entries from your config file, and a prepare execute() method? Maybe you forgot some important detail, or maybe it's just me doing a stupid mistake, but anyway, it doesn't work! :-(
Yours
Miguel Arroz
On 12 de mai de 2004, at 12:55, Riyad Kalla wrote:
Miguel,
I had this problem alot when I was developing a management system. For example, on my DeleteConfirmation pages, I wanted to show all the info for the entity I was erasing (for example, a User). So how I set that up was 2 actions in my struts-config:
<action input="whatever" name="userForm" type="com.example.DeleteUserForward"> <forward name="continue" path="/deleteUser.jsp" /> </action>
<action input="/deleteUser.jsp" name="userForm" type="com.example.DeleteUserAction"> <forward name="success" path="/listUsers.do" redirect="true" /> <forward name="failure" path="/deleteUser.jsp" /> </action>
So the idea here is that your first action is a pretty plain action that looks like this:
execute() { UserForm userForm = (UserForm)form; userForm.setXXX; ... userForm.setXXX; request.setAttribute("userForm", userForm); return mapping.findForward("continue"); }
and when you get the JSP page, your userForm has been populated with all the necessary info.
Hope this helped, Riyad
Fire, walk with me.
Miguel Arroz - [EMAIL PROTECTED] - http://www.guiamac.com
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]