Sivaswamynatha K wrote:
Hello friends,
I am using struts 1.2.9. In my project, I have to navigate along the
five jsp pages. For each page I have one next button which updates the
data to the database. During that time I have to do only mask validation
and not required validation. In the fifth page I have one save button.
On clicking that I have to do required validation for all the previous
pages and then update the database. How to do this?
You need to have all the inputs available when the 5th page is submitted
-- either by gathering them in a session scoped form as you work through
the prior pages, or by including the inputs from prior pages as hidden
fields in each subsequent page.
Then you just write validation rules as normal for the final page,
including the required rules.
This workflow sounds a bit cumbersome, though; what if the user didn't
enter a required field on page one? They don't find out they made a
mistake until four pages later? Obviously I don't know your exact
requirements, but that sounds kinda painful... ;-)
L.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]