What is the pattern for processing a form? 

Given:
  MyForm extends ActionForm
  MyFomAction extends Action
  MyForm.jsp displays the form
  using Struts 1.1 beta


1. Prior to calling MyFormAction.execute(), a MyForm() object is
created by struts. In 1.0.x I would create the form object here.  The
struts example app was modified to accomodate this change.

2. In MyFormAction.execute() I call the form's set methods to setup
the form's properties.

3. I save the form in the request attributes

4. The form is displayed by MyForm.jsp

5. The user hits submit button.

6. MyForm.reset() is called on a newly created MyForm().

7. MyForm set methods are called on the form in step #6

8. I see the MyForm saved to the request attributes in step #3.

9. Struts calls MyForm.execute() with the form created in step #6

The problem is that struts is not giving me back the Form object
saved in the request attributes in step #3 after the submit. Instead
I get a new form obbject that was created in step #6. I want the one
saved in the request attributes because it contains information
needed to save the form back to the database or for a multipage form.


__________________________________________________
Do You Yahoo!?
Yahoo! Movies - coverage of the 74th Academy Awards®
http://movies.yahoo.com/

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

Reply via email to