Hi Matt, here is what we did for our project:
http://bookie.googlecode.com/svn/trunk/bookie-framework/src/main/java/org/bookie/framework/CustomDelegate.java Hope this helps. Regards Igor On 9/13/07, mraible <[EMAIL PROTECTED]> wrote: > > > Has anyone written their own ValidationDelegate implementation that > manipulates the CSS class of the component's FieldLabel? > > Thanks, > > Matt > > > mraible wrote: > > > > I have a @FieldLabel that's written as follows: > > > > <label class="desc" jwcid="@FieldLabel" > > field="component:usernameField">Username</label> > > > > When the "usernameField" has an error, I want to change the class to > "desc > > error" or just "error". I've created my own ValidationDelegate and tried > > to overwrite writeLabelAttributes(), but it doesn't seem to work. > > > > Is there something I'm doing wrong in the code below? > > > > public void writeLabelAttributes(IMarkupWriter writer, IRequestCycle > > cycle, IFormComponent component) { > > if (isInError(component)) { > > writer.appendAttribute("class", "error"); > > } > > } > > > > Thanks, > > > > Matt > > > > -- > View this message in context: > http://www.nabble.com/Customizing-ValidationDelegate-with-writeLabelAttributes-tf4349798.html#a12661641 > Sent from the Tapestry - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >