struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Struts Newsgroup (@Basebeans.com) <str...@basebeans.com>
Subject Re: validate multiple forms
Date Tue, 06 Aug 2002 00:40:03 GMT
Subject: Re: validate multiple forms
From: "Hu Ji Rong" <hujirong888@yahoo.com>
 ===
That's all good ideas.

We take the second approach. One thing need to point out is that you still
need to specify a form bean and input page for that action. We check the
errors in that save action and all the errors will be displayed in that
input page, even some are come from other pages. That's still better then
seperate the error in different page since the user don't know which page
got the error.

Thanks Keith.

JiRong

"Kamholz, Keith (corp-staff) USX" <kkamholz@moog.com> wrote in message
news:mailman.1028551860.2347.struts@basebeans.com...
> Huh?  How would that work?  It would still get validated.  I do this by
> adding a boolean variable to my ActionForm that determines whether or not
it
> should get validated.  If the page requires validation, then I use
> <jsp:setProperty name="name" property="prop" value="true"/> within the
head
> of the JSP.  I just set the value to false on the pages that don't require
> validation.  Then in the ActionForm's validate method, I have it check the
> boolean, and if it's false just returns null.
>
> The other thing you could do, (and it's probably better), is to specify
> different action mappings for the pages that require validation, and the
> pages that don't.  Use validate="(true or false)" in the action mapping.
> Some people try to avoid too many action mappings, but your situation is a
> good reason to use different ones.
>
> Does that help ya?
>
> ~ Keith
> http://www.buffalo.edu/~kkamholz
>
>
>
> -----Original Message-----
> From: MAXMOUSE [mailto:maxmouse@ciindia.com]
> Sent: Monday, August 05, 2002 6:52 AM
> To: Struts Users Mailing List
> Subject: Re: validate multiple forms
>
>
> Hi,
>
>   Set the scope of the formbean as Session. Don't use reset method in form
> bean.
> bye
> muruges.
> ----- Original Message -----
> From: "Struts Newsgroup" <@Basebeans.comstruts@basebeans.com>
> To: <struts-user@jakarta.apache.org>
> Sent: Monday, August 05, 2002 3:40 PM
> Subject: validate multiple forms
>
>
> > Subject: validate multiple forms
> > From: "Hu Ji Rong" <hujirong888@yahoo.com>
> >  ===
> > Hi,
> >
> > We have something like a wizard. The data will only be saved into DB
when
> > user have finished entering all the date in multiple forms (pages).
There
> > are some submit buttons to manipulate the data in each form. But we
don't
> > want to do the validation each time when those submit buttons are
clicked.
> >
> > Validation sould be done only when a special link for "Save" is clicked.
> So
> > is that possible to utilize Struts form validation?
> >
> > Thanks in advance,
> > JiRong
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:struts-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message