Sandeep

Let me try. See if the solution proposed makes sense as the techniques were
discussed before.

1) Include a "PageNumber" attribute into your Form bean. In your JSP, store
the PageNumber as a hidden attribute. In your form.validate() method,
determine which page is passed then validate the appropriate fields. For
this to work, you will need maintain your form bean in the session object
(ie set the scope in your struts-config.xml file).

2) Create three form beans (ie one for each JSP) and create a "mother" bean
that has all the attributes of the three form beans. In this case, each form
beans can perform its validate method() and the form action class can copy
each form properties to the "mother" bean using PropertyUtil.copyProperty
method. Note you will need to store the "mother" bean into the session
object.

Regards

Michael Mok
www.webappcabaret.com/normad

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 12 June 2001 15: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