You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Christopher Becker <CB...@cablevision.com> on 2005/10/18 15:19:51 UTC

Associating validation errors with input fields

 
I have a form in a Struts app (v1.2.7) that I am attempting to use in
conjunction with the validator framework. I wish to associate the error
messages directly with the input field that caused them (e.g. additional
row in a table, etc.)  I am using the <html: errors/> tag and can see
that the errors are being generated correctly, but they are in a list
and are not directly associated to the input fields. Is there a way to
do this? I see an implied reference to the errors in the errorKey
attribute of the <html:text/> tag, but not sure how this works. Any
suggestions or guidance would be appreciated....
 
Regards,
 
 
 
Chris Becker
Senior Programmer/Analyst
Enterprise IT
(516) 803-3921
cbecker@cablevision.com

Re: Associating validation errors with input fields

Posted by Ramesh Mohan Reddy <re...@yahoo.com>.
Hi there,

Say u hv a <html:text/> with the property name
"custName".  U can use <html:errors
property="custName"/> right below the <html:text/>. 
So, when an action error occurs, it will be displayed
right below the <html:text/> corresponding to the
property.

Regards,
Ramesh M.

--- Christopher Becker <CB...@cablevision.com>
wrote:

>  
> I have a form in a Struts app (v1.2.7) that I am
> attempting to use in
> conjunction with the validator framework. I wish to
> associate the error
> messages directly with the input field that caused
> them (e.g. additional
> row in a table, etc.)  I am using the <html:
> errors/> tag and can see
> that the errors are being generated correctly, but
> they are in a list
> and are not directly associated to the input fields.
> Is there a way to
> do this? I see an implied reference to the errors in
> the errorKey
> attribute of the <html:text/> tag, but not sure how
> this works. Any
> suggestions or guidance would be appreciated....
>  
> Regards,
>  
>  
>  
> Chris Becker
> Senior Programmer/Analyst
> Enterprise IT
> (516) 803-3921
> cbecker@cablevision.com
> > BEGIN:VCARD
> VERSION:2.1
> X-GWTYPE:USER
> FN:Becker, Christopher
> TEL;WORK:(516)803-3921
> ORG:;Corporate Information Systems
> TEL;PREF;FAX:(516)803-6115
> EMAIL;WORK;PREF:CBECKER@cablevision.com
> N:Becker;Christopher
> TITLE:Sr., Programmer/Analyst
> ADR;DOM;WORK;PARCEL;POSTAL:;;;;New York
>
LABEL;DOM;WORK;PARCEL;POSTAL;ENCODING=QUOTED-PRINTABLE:Becker,
> Christopher=0A=
> New York
> END:VCARD
> 
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
user-help@struts.apache.org





		
__________________________________ 
Yahoo! Music Unlimited 
Access over 1 million songs. Try it free.
http://music.yahoo.com/unlimited/

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