You need to hack in...and do some dirty work on each jsp page...
 
You need to write your own <html:error> tag . Whenever there are some errors to be shown, you simply use some javascript to send focus to the first error field. Also in your jsp page (for evey text field) you might want to do something like an   if,else condition.. If no error show plain, else show in red font with the error msg. Hope this helps.
 
cheers,
Amar..
-----Original Message-----
From: Mike Prader [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 11, 2001 10:13 AM
To: [EMAIL PROTECTED]
Subject: Error handling with taglibs

Hi all
 
My problem is, that I want to mark a textfield red and set the focus
to it after I checked the fields in my from the Action Class derived class and I detected an
error in this input.
I want to use taglibs also.
 
Is there any possibility to do this in my from the ActionForm Class derived class, so that Struts will
automatically set this field to another colour and set the focus to it ? If not what is
the best solution to mark the attribute in my from the ActionForm Class derived Class that this field
isn't ok ?
 
regards
 
mike

Reply via email to