Re: Error messages is repeated Using Struts 2 Annotation validation
The documentation covers using images in submit buttons. http://struts.apache.org/2.0.11/docs/submit.html * input: renders as html * image: renders as html * button: renders as html Regards, Randy Burgess Sr. Web Applications Developer Nuvox Communications > From: Johnson nickel <[EMAIL PROTECTED]> > Reply-To: Struts Users Mailing List > Date: Tue, 29 Jan 2008 23:28:42 -0800 (PST) > To: > Subject: Re: Error messages is repeated Using Struts 2 Annotation validation > > > Thanks for your quick response, > > In my Login.jsp, > > > > > Instead of using , I used html image tag . > If i used it works fine. > > > > > > newton.dave wrote: >> >> --- Johnson nickel <[EMAIL PROTECTED]> wrote: >>> >> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",messag >> e="UserName >>> is required") >> >> For a string field you'll probably want to use the >> @RequiredStringValidator: >> a text field will return an empty string, whereas @RequiredFieldValidator >> only checks for null-ness (different from blank-ness). >> >>> Same as For password also , >> >> *Exactly* the same? (You put the right "fieldName" for the password field, >> right?) >> >>> When i have submit the Login button, the Error messages is displaying >> Repeated. >> >> You'll need to provide some JSP and possibly configuration in order to >> help >> diagnose the problem. >> >> Where are the duplicated messages appearing? >> >> Dave >> >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> >> > > -- > View this message in context: > http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-val > idation-tp15157319p15176802.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error messages is repeated Using Struts 2 Annotation validation
Thanks for your quick response, In my Login.jsp, Instead of using , I used html image tag . If i used it works fine. newton.dave wrote: > > --- Johnson nickel <[EMAIL PROTECTED]> wrote: >> > @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName >> is required") > > For a string field you'll probably want to use the > @RequiredStringValidator: > a text field will return an empty string, whereas @RequiredFieldValidator > only checks for null-ness (different from blank-ness). > >> Same as For password also , > > *Exactly* the same? (You put the right "fieldName" for the password field, > right?) > >> When i have submit the Login button, the Error messages is displaying > Repeated. > > You'll need to provide some JSP and possibly configuration in order to > help > diagnose the problem. > > Where are the duplicated messages appearing? > > Dave > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-validation-tp15157319p15176802.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error messages is repeated Using Struts 2 Annotation validation
Hi, Something simillar happens to me when i started with Struts 2. I use appfuse and I realized that a message displays just above the field I'd validated, and where I included a messages.jsp (this jsp displays the action and error messages), usually at the top of the html page. To solve this I supressed the field messages (those that are displayed above the field) rewriting the tag templates. Struts gives you the chance to override the templates they provide. I created a tree at WEB-INF level just like they are in the struts2-core library (template/css_xhtml/...). The files you put there will overwrite the Struts2 ones, and change the default behaviour of the tags. Regards. Johnson nickel wrote: > > Hi Friends, > > I am using Struts 2 application for my project. Before I was used Struts 1 > when compare to this > > Struts 2 is reduced lot of configuration problems. I have use the > Annotation validation to validate the > Username and password fields in my Login page. > > Code: > > > @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName > is required") > public String getUsername() { > return username; >} > > > > Same as For password also , > > When i have submit the Login button, the Error messages is displaying > Repeated. I have spend lot of time > on this issue. Can u anybody give me the solution. > > Thanks and Regards, > Johnson > -- View this message in context: http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-validation-tp15157319p15160651.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Error messages is repeated Using Struts 2 Annotation validation
--- Johnson nickel <[EMAIL PROTECTED]> wrote: > @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName > is required") For a string field you'll probably want to use the @RequiredStringValidator: a text field will return an empty string, whereas @RequiredFieldValidator only checks for null-ness (different from blank-ness). > Same as For password also , *Exactly* the same? (You put the right "fieldName" for the password field, right?) > When i have submit the Login button, the Error messages is displaying Repeated. You'll need to provide some JSP and possibly configuration in order to help diagnose the problem. Where are the duplicated messages appearing? Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Error messages is repeated Using Struts 2 Annotation validation
Hi Friends, I am using Struts 2 application for my project. Before I was used Struts 1 when compare to this Struts 2 is reduced lot of configuration problems. I have use the Annotation validation to validate the Username and password fields in my Login page. Code: @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName is required") public String getUsername() { return username; } Same as For password also , When i have submit the Login button, the Error messages is displaying Repeated. I have spend lot of time on this issue. Can u anybody give me the solution. Thanks and Regards, Johnson -- View this message in context: http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-validation-tp15157319p15157319.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]