Hi,

Learning how to make a Validator, here is a simple one, not even
functioning, just want to see if it is being called:

public class UpperCase extends AbstractValidator<String, Object> {
    public UpperCase() {
        super(String.class, Object.class, "uppercase-string");
    }
    public void validate(Field field, String s, MessageFormatter
messageFormatter, Object o) throws ValidationException {
        System.out.println("validate");
    }
    public void render(Field field, String s, MessageFormatter
messageFormatter, MarkupWriter markupWriter, FormSupport formSupport) {
        System.out.println("render");
    }
}

In the AppModule, I contribue it:

public static void
contributeFieldValidatorSource(MappedConfiguration<String, Validator>
configuration)
   {
       System.out.println("contributing uppercase");
       configuration.add("upperCase", new UpperCase());
   }

the above code was never called, why? Thanks,

A.C.
-- 
View this message in context: 
http://www.nabble.com/T5%3A-contributing-a-validator--tp16194294p16194294.html
Sent from the Tapestry - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to