You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by john lee <sh...@yahoo.com> on 2013/06/19 03:56:21 UTC

multiple form s:fielderror mesg cross over, how to solve?

i need to have multiple <s:form> on single web page,

(at top panel, our site always provide parts search box/<s:form>)
(at middle panel,  could have other form <s:form> such as checkout section, login section, etc)

when  any single form's validation triggered, then <s:fielderror> and <s:actionerror/> displayed at all form's textfields  place, 

how to solve it?

or that is struts 2 bug?

please help

thanks in advance

john

Re: multiple form s:fielderror mesg cross over, how to solve?

Posted by john lee <sh...@yahoo.com>.
Thanks Chester, 
   the  fieldName attribute is good remind,  that is what i am looking for.


________________________________
 From: Chester Twomey <ch...@gmail.com>
To: Struts Users Mailing List <us...@struts.apache.org>; john lee <sh...@yahoo.com> 
Sent: Wednesday, June 19, 2013 9:02 AM
Subject: Re: multiple form s:fielderror mesg cross over, how to solve?
 

Are you setting the field name attribute for your <s:fielderror> tags?
Could you provide a sample of what you are doing in your jsp?

Another possibility is you need to short circuit your validators.

The official docs cover both these topics:
http://struts.apache.org/release/2.3.x/docs/validation.html#Validation-ShortCircuitingValidator
http://struts.apache.org/release/2.3.x/docs/fielderror.html

Please provide some code samples i can look at to help you more.

On Tue, Jun 18, 2013 at 8:56 PM, john lee <sh...@yahoo.com> wrote:
> i need to have multiple <s:form> on single web page,
>
> (at top panel, our site always provide parts search box/<s:form>)
> (at middle panel,  could have other form <s:form> such as checkout section, login section, etc)
>
> when  any single form's validation triggered, then <s:fielderror> and <s:actionerror/> displayed at all form's textfields  place,
>
> how to solve it?
>
> or that is struts 2 bug?
>
> please help
>
> thanks in advance
>
> john



-- 
~Chester

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

Re: multiple form s:fielderror mesg cross over, how to solve?

Posted by Chester Twomey <ch...@gmail.com>.
Are you setting the field name attribute for your <s:fielderror> tags?
Could you provide a sample of what you are doing in your jsp?

Another possibility is you need to short circuit your validators.

The official docs cover both these topics:
http://struts.apache.org/release/2.3.x/docs/validation.html#Validation-ShortCircuitingValidator
http://struts.apache.org/release/2.3.x/docs/fielderror.html

Please provide some code samples i can look at to help you more.

On Tue, Jun 18, 2013 at 8:56 PM, john lee <sh...@yahoo.com> wrote:
> i need to have multiple <s:form> on single web page,
>
> (at top panel, our site always provide parts search box/<s:form>)
> (at middle panel,  could have other form <s:form> such as checkout section, login section, etc)
>
> when  any single form's validation triggered, then <s:fielderror> and <s:actionerror/> displayed at all form's textfields  place,
>
> how to solve it?
>
> or that is struts 2 bug?
>
> please help
>
> thanks in advance
>
> john



-- 
~Chester

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