I have a TextField which overrides it's getConverter method to add a
Joda time converter instead:

new TextField<P>(id) {
    @Override
    public <P> IConverter<P> getConverter(Class<P> type) {
        return (IConverter<P>) new JodaDateTimeConverter();
    }
};

The converter returns null if input was invalid. However, I want to be
able to flag this field as required, and I don't know how to do that:

 - textField.isRequired(true) does not work, because required checks
are done before conversion. This doesn't work for non-empty but
invalid inputs.

 - textField.add(.. some validator ..) does not work because no
validator is called if the converter returned null.

I really don't see an approach to flag my date fields as required. Do
you know how to do that? Probably my approach is not suited at all?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to