Bruno Dumon wrote:

I was just looking at adding widget validators on widget instances and
found it's already there. Cool :-)

Still a question about the WidgetValidator interface:

public interface WidgetValidator {
    boolean validate(Widget widget, FormContext context);
}

will a validator ever need the FormContext object?


I had the same question popin' up when looking at validate(FormContext) on widget.. only thing I could imagine was that it might be useful to have access to the Locale?


And I would need to take a deeper look but probably one could (today) obtain the same through widget.getFormDefinition().getLocale()

this assumes that validation is called after readFromRequest() (no pro) but would also assume that if validation needs to happen after binding (doesn't ATM) this locale on form should be set

regards,
-marc=
--
Marc Portier                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at                http://blogs.cocoondev.org/mpo/
[EMAIL PROTECTED]                              [EMAIL PROTECTED]

Reply via email to