I think this sounds like what I am doing.  I have a form that performs
an action, the goes to another form, either the same or different but a
new form needs to be set.  

Pseudo code:
Form formObject = new Form();
formObject.setId("1");
formObject.setName("NEW");
Request.setAttribute("formName", formObject);
Return(new ActionForward("somewhere");

Is this what you are trying to do?  I use this because I get a form
object that is partially populated and use it to look up and return a
fully poplated form, I then just overwrite the request attribute with
this new form.

Or a form may have multiple possible actions some going to new forms of
a different type, so I lookup and set some initial info and set that
into the request.

Hope this helps,
Jake T.


-----Original Message-----
From: Jack [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 03, 2002 6:09 PM
To: Struts Users Mailing List
Subject: RE: Forwarding Data For A Form


James,

Isn't the Action's perform() called as a result of the Form's action
being invoked and after the form's validate() method succeeds?  What I'm
wanting is the form input fields to be prepopulated with data sent by
another Action so when the JSP form is displayed the fields are all
filled in.

I thought the <jsp:useBean> tag would work, but it didn't.  (I didn't
want to expose the class name of the bean to the JSP page anyway.  I was
hoping to stay in the Struts Model 2 framework to keep all the Java
details abstracted away from the JSP developers.)

Jack

-----Original Message-----
From: James Dasher [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 5:15 PM
To: 'Struts Users Mailing List'
Subject: RE: Forwarding Data For A Form


If I am not mistaken, the form is passed into the action.perform() as a
parameter.

You should be able to get/set your bean properties there.

-----Original Message-----
From: Jack [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, January 02, 2002 5:51 PM
To: Struts Users Mailing List
Subject: Forwarding Data For A Form


How can I get an action form to display data generated by an action?

I have a Registration action that updates a database and generates a
user id.  The perform() method of that action forwards an ActionForward
object mapped to a Login form.  I want the Login form to display the
generated user ID from the Registration action.  I'm not sure how to
pass along the user ID so it will automatically be picked up by the
Login form and displayed in the proper input field.

Thanks.

Jack


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>




--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to