Thanks igor,

I had a go at implementing the form level validator, but it still requires a
FormComponent to attach its error message to.

For example:
form.add(new IFormValidator() {
  @Override
  public void validate(Form f) {
    if (myList.size() == 0)  {
      f.error(new ValidationError().addMessageKey("error.myErrorMessage"));
    }
  }

  @Override
  public FormComponent[] getDependentFormComponents() {
    return null;
  }
});

If I don't return a FormComponent in getDependentFormComponents(), I get the
following message in my Feedback Panel:
[ValidationError message=[null], keys=[error.myErrorMessage],
variables=[null]]

Is there a way around this that you are aware of?

T


igor.vaynberg wrote:
> 
> see IFormValidator
> 
> -igor
> 

-- 
View this message in context: 
http://www.nabble.com/Form-validation-without-a-form-component-tp22682572p22717797.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to