You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Witbeck, Shane" <Sh...@bankofamerica.com> on 2003/07/31 18:51:49 UTC

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?

Thanks,

Shane

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


Re: extending Struts taglibs to indicate form field states

Posted by Rob Leland <rl...@apache.org>.
Mike Jasnowski wrote:

>>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..
>
>We also use this mechanism to share layout information for many of the
>forms, nice way to centralize this type of information.
>  
>

Cool !

-- 
-----
Rob Leland (703-525-3580)


Choose a job you love, and you will never have to work a day of your life.
                                                                                      -Confucius.



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


RE: extending Struts taglibs to indicate form field states

Posted by Mike Jasnowski <mj...@bea.com>.
>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..

We also use this mechanism to share layout information for many of the
forms, nice way to centralize this type of information.

-----Original Message-----
From: Mike Jasnowski [mailto:mjasnows@bea.com]
Sent: Thursday, July 31, 2003 1:36 PM
To: Struts Users Mailing List
Subject: RE: extending Struts taglibs to indicate form field states


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:news@main.gmane.org]On Behalf Of Yann Cébron
Sent: Thursday, July 31, 2003 1:33 PM
To: struts-user@jakarta.apache.org
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



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


RE: extending Struts taglibs to indicate form field states

Posted by Mike Jasnowski <mj...@bea.com>.
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:news@main.gmane.org]On Behalf Of Yann Cébron
Sent: Thursday, July 31, 2003 1:33 PM
To: struts-user@jakarta.apache.org
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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



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


Re: extending Struts taglibs to indicate form field states

Posted by Yann C�bron <ya...@yahoo.de>.
> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org