You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by kace <me...@hotmail.com> on 2008/08/15 22:15:43 UTC

[T5] overriding a component

In appfuse-tapestry4 there is a custom validation delegate

public class ValidationDelegate extends
org.apache.tapestry.valid.ValidationDelegate {..}

which overrides the afterLabelText

@Override
    public void afterLabelText(IMarkupWriter writer, IRequestCycle cycle,
IFormComponent component) {
        if (component.isRequired()) {
            writer.begin("span");
            writer.attribute("class", "req");
            writer.printRaw(" *");
            writer.end();
        }
    }

so there is an * next to the label on fields that have required set to true.

Can someone send me in the right direction on how I can go about achieving
something similar using Tapestry 5?

Thanks

..kace


-- 
View this message in context: http://www.nabble.com/-T5--overriding-a-component-tp19004891p19004891.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


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