struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Kitchen" <>
Subject Re: Multi-page form
Date Tue, 10 Oct 2000 13:55:44 GMT
Sean Moore wrote:
> I also am very interested in the multipage "form".
> a quote from the old user manual reads:
> "Struts encourages you to define a single ActionForm bean that contains
> properties for all of the fields, no matter which page the field is
> actually displayed on. Likewise, the various pages of the same form
> should all be submitted to the same Action Class. If you follow these
> suggestions, the page designers can rearrange the fields among the
> various pages, with no changes required to the processing logic in
> most cases."
> What attracted me was the ability for designers to take my
> extra long one page form and turn it into as many pages as
> needed for normal people and not change any application logic.
> I have created a ActionForm called MultipageForm with all of the
> variables.
> I have created one Action called MultipageAction.
> I like only having one Action and only one ActionForm.
> My first sticking point is how do I validate the variables
> on just the submited page before moving to the next page?
> If my designers are moving things all around on
> different pages then how do I know which variable is on
> which page and when to validate it?
> Can someone point me in the right direction?
> When I get this working I would be glad to submit it as an
> example.
> Thanks,
> Sean

This is something that we're trying to do now. 
According to the struts user guide and looking at the source code
it appears that the developers want us to use a ValidatingActionForm.
Implementing the ValidatingActionForm means implementing the
validate method which has no parameters and hence no reference to the
HttpServletRequest is available to perform the validations. Since we 
don't have access to the request how is it possible to figure out which
form attributes were passed to the servlet ?

May be some modifications are required to the API in order to support
this ?

-- Jason

View raw message