Hello,
I'm using a custom validator (implements Validator) and the
ValidationDelegate.
I've verified that the custom validator I'm using is working correctly - the
getHasErrors() of the delegate returns true. But ValidationDelegate doesn't
decorate anything (no asterics, no red labels).
I then used my own extended ValidationDelegate class and overriden the
writeSuffix method:
public void writeSuffix(IMarkupWriter writer, IRequestCycle arg1,
IFormComponent formComponent,
IValidator validator) {
if (isInError(formComponent)) {
// more code here
}
and noticed that the isInError() test allways returns false despite the fact
that my validator is throwing ValidatorException on validation error.
Page template:
<label jwcid="@FieldLabel" field="component:QuantityField"></label>
<input jwcid="QuantityField" type="text" size="2" maxlength="2" />
Page spec:
<component id="QuantityField" type="TextField">
<binding name="displayName" value="message:Quantity" />
...
</component>
Thanks for your time!
</Firas>