You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Mike Prader <mp...@pcci.ch> on 2001/05/11 16:12:48 UTC
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
Re: Error handling with taglibs
Posted by Scott Walter <tx...@yahoo.com>.
I have thought about this myself, just a rough guess
but you could modify the struts input tags (such as
the textfield) to do:
1. Search through the errors vector to see if it
applies to the current property
2. Set background color to the text field to red or
something like that.
scott.
--- Mike Prader <mp...@pcci.ch> wrote:
> 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
>
=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scott
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/