You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Ghanakota, Vishu" <GV...@firstam.com> on 2003/11/13 03:26:42 UTC

RE: Show validation error messages next to the corresponding inpu t fields

use the "errors" tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to an
entry in ResourceBundle. "errors" tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-----Original Message-----
From: Kevin Wang [mailto:knwang@us.ibm.com]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


"MMS <firstam.com>" made the following
 annotations on 11/12/2003 06:26:48 PM
------------------------------------------------------------------------------
"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================


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


RE: Show validation error messages next to the corresponding inpu t fields

Posted by Kevin Wang <kn...@us.ibm.com>.



Thanks Vishu,

But my question is that how to put the error messages in the location next
to their input fields. Something like this:


User name: (input box for user name)

First name: (input box for first name)

*Error: Last name can't be empty.
Last name:(input box for last name)

....
*Error: invalid credit card number.
Credit Card Number (input box for credit card number)

......

Thanks,
kevin



                                                                                                                                       
                      "Ghanakota,                                                                                                      
                      Vishu"                   To:       "'Struts Users Mailing List'" <st...@jakarta.apache.org>                
                      <GVishweshwar@fir        cc:                                                                                     
                      stam.com>                Subject:  RE: Show validation error messages next to the corresponding inpu t fields    
                                                                                                                                       
                      11/12/2003 08:26                                                                                                 
                      PM                                                                                                               
                      Please respond to                                                                                                
                      "Struts Users                                                                                                    
                      Mailing List"                                                                                                    
                                                                                                                                       




use the "errors" tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to
an
entry in ResourceBundle. "errors" tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-----Original Message-----
From: Kevin Wang [mailto:knwang@us.ibm.com]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


"MMS <firstam.com>" made the following
 annotations on 11/12/2003 06:26:48 PM
------------------------------------------------------------------------------

"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS
MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================



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




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