You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Fernando Jimenez <fe...@db.com> on 2003/05/27 11:44:41 UTC

multi form pages

Hi

I am trying to design a page with two action forms in it. This should not be too big a problem. Just have two action classes and two action forms, one for each form.

My problem is that I need to populate _both_ forms with some values, prior to page display. Does anyone know how I can do this? to my knowledge, an Action class is only associated with a single ActionForm, so I can't see a straight way to do this

Also, I have another problem. How can I forward control from one Action class to another Action class if they use different action forms? for example, say I have a page with two forms. One with data associated with it, and a second one which is just a submit button with some hidden values. When the user first comes to the page, control is sent to Action A, which populates the form. When the user changes/enters some data and clicks on submit, control is given again to Action A, which takes action, repopulates the form, and presents it again to the user.

However, if the user clicks on the other form submit button, control would go to Action B which has a different ActionForm (B) associated with it. How could I then populate the data for form A if Action B is associated with ActionForm B, to redisplay the page to the user?

Sorry if it's a bit confusing. I can try to explain it better if need be

Thanks in advance

FJ


--

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: multi form pages

Posted by Mike Whittaker <mi...@ntlworld.com>.
>Hi
>
>I am trying to design a page with two action forms in it. This
>should not be too big a problem. Just have two action classes and
>two action forms, one for each form.
>
>My problem is that I need to populate _both_ forms with some
>values, prior to page display. Does anyone know how I can do this?
>to my knowledge, an Action class is only associated with a single
>ActionForm, so I can't see a straight way to do this
>

I think that an ActionForm is not associated with an HTML form rather it is
associated with an Action, this is why it is registered in an action mapping
rather than the <html:form> element

--
Mike W


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org