This idea is very similar to this one:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18015

I have a <custom:label> tag that I implemented to do this very thing for field labels. I use the standard <html:*> form tags though, and do not style the fields themselves differently if they are in error, although that sounds like a good addition.

I get a couple of interesting benefits from my custom label tag:

- field labels are looked up in the resources with keys of the form FormName.fieldName (so naming conventions are needed)

- Asterisk appears by field labels that are required (available from the Validator metadata)

- In a special mode, the labels turn into hyperlinks that the user (an admin) can click to pop-up another window, type in a new label, and save it (we store resource text in a database with a custom DbResources implementation).

More integrated error handling in Struts gets a +1 from me! :)

Erik


On Friday, June 6, 2003, at 04:05 PM, DeRose Jonathan wrote:


Hello,

I have an idea that I would like to propose to the Struts community
involving the HTML tag library; automatic highlighting of errored form
elements. I have used Struts for a couple medium sized projects and always
extended the tags to get this functionality. After doing this two or three
times, I thought it would be great if Struts has this functionality built
in.


I have gone through all the source and feel confident about the changes
that would need to be made. I have prepared documentation describing all of
the details, but I wanted to post this first to introduce myself and my
idea. If you guys would like to hear more, I would love to post my
documentation for everyone to look at.


Thanks,
Jonathan R. DeRose



---------------------------------------------------------------------
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]



Reply via email to