Re: Validation of 3 dependent fields

2013-04-14 Thread Francois Meillet
Hi André, You can add this validator to the form import org.apache.wicket.markup.html.form.Form; import org.apache.wicket.markup.html.form.FormComponent; import org.apache.wicket.markup.html.form.validation.AbstractFormValidator; import org.apache.wicket.util.string.Strings; import org.apache.wic

Re: Validation of 3 dependent fields

2013-04-14 Thread Sven Meier
You can implement an IFormValidator. Alternatively you use a custom IValidator which checks the current value of the optional field: public class OptionalValidator implements IValidator { private FormComponent optional; private IValidator validator; public OptionalValidator(FormCo

Validation of 3 dependent fields

2013-04-14 Thread ajac2010-s...@yahoo.de
Hi, i'd like to implement a "3-Field-Validator". This means if one optional field in a form is set, two other fields become mandatory as well. What's the best way to implement this? My first thought was to use it IValidator, but this accepts just values of one field - as far as i've understood My