You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sivaswamynatha K <k....@Kavniya.com> on 2007/08/17 12:58:12 UTC

validation issues

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?

 

Thank you

 

Regards,

K. Siva Swamynatha.

 


Re: validation issues

Posted by Laurie Harper <la...@holoweb.net>.
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: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org