You might try to return an empty array..

Martijn

On Thu, Mar 26, 2009 at 10:37 AM, triswork <[email protected]> wrote:
>
> 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]
>
>



-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com
Apache Wicket 1.3.5 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.

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

Reply via email to