> > fails because the list is empty so the 'add' fails, making it impossible
> to
> > add new elements when the list is empty.
> >
> > I thought validation would only occur when the user submits the form but
> it
> > appears to be fired off whenever t
t is empty so the 'add' fails, making it impossible
> to
> > add new elements when the list is empty.
> >
> > I thought validation would only occur when the user submits the form but
> it
> > appears to be fired off whenever the user presses the 'add'
mail.com]
Sent: Monday, 2 May 2011 2:28 PM
To: users@wicket.apache.org
Subject: Re: How to fail validation if ListMultipleChoice is empty
You are correct that the Form's validation should only fire when submitting
the form. When an individual element is updated via ajax (as in an
AjaxFormComponentUp
>
> I thought validation would only occur when the user submits the form but it
> appears to be fired off whenever the user presses the 'add' button. Is this
> to be expected?
>
>
> -----Original Message-
> From: Clint Checketts [mailto:checke...@gmail.com]
> Sen
2011 12:10 PM
To: users@wicket.apache.org
Subject: Re: How to fail validation if ListMultipleChoice is empty
Lets see the code about 'adding elements by pressing on a button'. The
'getValue()' method is returning the value from the list box's HTTP
submitted values, if t
Lets see the code about 'adding elements by pressing on a button'. The
'getValue()' method is returning the value from the list box's HTTP
submitted values, if the add button is submitting values via ajax or some
other means then it may need a different approach.
-Clint
On Sun, May 1, 2011 at 8:
We have an app that allows people to add elements to a ListMultipleChoice by
pressing on a button. We want the form to fail validation if the
ListMultipleChoice contains no elements.
I've tried this:
targettedSetsList.add(new IValidator()
{
public void validate(IValidatable validatable)