You don't need to populate a form for output. Forms are needed when you want
to gather user input.

Using your example I would have a form to gather the search criteria.
Submitting the form to the first action would gather a list of employess and
store that list in a request scope attribute. It would then forward to the
employee list jsp which would render the list of employees. Selecting an
employee would make a request to another action (without using an ActionForm
at all), which would create a request scope attribute containing employee
details, and forward to the details page which would show the details
contained in the new employee detail attribute.

HTH,

Paul

> -----Original Message-----
> From: Dan Allen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 19, 2004 8:18 PM
> To: [EMAIL PROTECTED]
> Subject: input and output form
> 
> 
> I often times run into the conflict, when developing a Struts
> application, of which form to choose for a given action.  The scenario
> is such that one form is being populated by the request while the
> other form needs to be populated for the output.  An example would be
> a sequence of pages describing an employee and his/her employment
> data.  The first page might be a form to search for employees.  The
> second page would display the employee.  Finally, the third page might
> show the details of an employment.  Each page has to lookup
> information and then prepare a form to display nested information.
> 
> Which form to use?  Perhaps Struts should have the concept of an input
> and an output form.  Or is the solution just to split the action into
> two and then do an internal forward from one to the next in sequence.
> 
> Dan
> 
> -- 
> Open Source Advocacy
> http://www.mojavelinux.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


**********************************************************************
Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you are not 
the addressee indicated in this message (or responsible for delivery of the message to 
such person), you may not copy or deliver this message to anyone. In such case, you 
should destroy this message, and notify us immediately. If you or your employer does 
not consent to Internet email messages of this kind, please advise us immediately. 
Opinions, conclusions and other information expressed in this message are not given or 
endorsed by my Company or employer unless otherwise indicated by an authorised 
representative independent of this message.
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted 
via electronic mail attachments we cannot guarantee that attachments do not contain 
computer virus code.  You are therefore strongly advised to undertake anti virus 
checks prior to accessing the attachment to this electronic mail.  Axios Systems Ltd 
grants no warranties regarding performance use or quality of any attachment and 
undertakes no liability for loss or damage howsoever caused.
**********************************************************************


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

Reply via email to