We use a mechanism that basically wraps a set of Struts Form/Form Fields in
a tag that applies a set of XSLT templates to the body of the tag.  This
enables use to add features like you describe w/o touching the Struts tags
themselves. We use it for custom error placement, highlighting form fields
for required, or error conditions, etc..

-----Original Message-----
From: news [mailto:[EMAIL PROTECTED] Behalf Of Yann C�bron
Sent: Thursday, July 31, 2003 1:33 PM
To: [EMAIL PROTECTED]
Subject: Re: extending Struts taglibs to indicate form field states



> Im considering extending the Struts taglibs (specfically the form object
> tags). What Im thinking about doing is adding a "formStateObject" to my
> ActionForm beans and having it dictate the "state" of specifc elements of
a
> form. For example, if a particular field should be disabled, then I would
> add disable="true" to the parsed form tag. Other properties of my
> formStateObject include changing the css class of the object (to indicate
> which fields are required) and whether or not to display a form object. My
> intention is to clean up the JSP's that currently have logic tags wrapping
> code according to the values set in formStateObject.
>
> Has anyone else extended the taglibs in such a way?
> Opinions on this type of approach?

Try struts-layout:
http://struts.application-servers.com/

There are also some Bugzilla-tickets with attached patches regarding the
problem of marking input fields depending on their state.

HTH,
    Yann




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