Michael,

Regarding your proposed solution#2, design a mother
form bean that contains three child form beans. in
that case how the child form bean will be
instantiated?

and will these child form beans auto collect data
submited by users?

Rgds,
Victor


--- Michael Mok <[EMAIL PROTECTED]> wrote: >
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
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send dad a Father's Day Card!
http://greetings.yahoo.com.sg/

Reply via email to