Well I don't know if this is conventional, but what I've done is to add an
attribute to the form, say 'action', and to add action as a hidden field in
the form. Then assign it a different value on each form... in your case
maybe 'education', 'experience' and 'general'.

        <form:hidden property="action" value="education"/>

Then in your validate() method check what the action field is set to and
only validate the fields on that form.

Simple.

- Darryl

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: 12 June 2001 09:32
To: [EMAIL PROTECTED]
Subject: Handling Multipart forms (sort of Wizard)





Hello All,

I am using mulipart forms for adding an employee information.
In this I have 3 forms namely, emplEducation, emplExperience, emplGeneral in
separate JSPs.
In this case, I am using only one form bean for all these JSPs and only one
action class.

My problem is how to validate the Form bean after each page submission:
----------------------------------------------------------------------------
--------------------------------

I know the validation can be done in the form bean using validate() method
or in
the action class

But, if user filled emplEducation form and press "Next", to go to
emplExperience,
how do I validate only those form bean fields related to emplEducation and
not
the others till they are entered by user??
Is there any straight forward strategy for handling this??

- Sandeep











Reply via email to