You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Jon Newton <jo...@SCANSOFTWARE.COM> on 2004/08/06 17:54:55 UTC

Marking required fields in a consistent manner

Hello, 

I'm creating a form which contains almost every type of form element
(input, radio, checkbox, etc). Some elements will always be required
while others will change based on business data. I'd like to handle the
visual marking on the screen in a consistent manner, regardless of the
component. I've ruled out using ValidField decoration because the same
can't be applied to other components. Right now I'm thinking of
generating a List of required components in the page class and then tie
that into the page template, probably with a Conditional on each field
label. And then I guess this can be turned into a component itself. This
still feels like a bit of a kluge. Anyone else dealt with this problem? 


Jon 

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


Re: Marking required fields in a consistent manner

Posted by Marcus Brito <mb...@gmail.com>.
Take a look at the ValidationDelegate class. A validation delegate
takes care of decorating required fields in a consistent (and easy to
do) manner.

-- Marcus Brito

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