Hi,
I've tried to reuse in my T4 application the way HLS has implemented
required field decoration with an "*" in his book "Tapestry In Action" :
My field is set "required" in my registration.page :
<component id="firstname" type="TextField">
<binding name="value" value="firstname"/>
<binding name="displayName" value="message:firstname-label"/>
<binding name="validators"
value="validators:required,maxLength=30"/>
</component>
And i've subclassed the ValidationDelegate by surcharging the
writeSuffix function :
public void writeSuffix(IMarkupWriter writer, IRequestCycle cycle,
IFormComponent component, IValidator validator) {
if (validator != null && validator.isRequired()) {
writer.printRaw(" ");
writer.begin("span");
writer.attribute("class", "required-marker");
writer.print("*");
writer.end();
}
}
But my required marker is never visible on my form ...
Any idea is welcome.
--
Stéphane Decleire
05 56 57 99 20
06 63 78 69 06