List of usage examples for org.apache.wicket.markup.html.form Form getBehaviors
public <M extends Behavior> List<M> getBehaviors(Class<M> type)
From source file:com.evolveum.midpoint.web.component.prism.PrismValuePanel.java
License:Apache License
private DateValidator getActivationRangeValidator(Form form, ItemPath path) { DateValidator validator = null;//from w ww . j av a 2 s .com List<DateValidator> validators = form.getBehaviors(DateValidator.class); if (validators != null) { for (DateValidator val : validators) { if (path.equals(val.getIdentifier())) { validator = val; break; } } } if (validator == null) { validator = new DateValidator(); validator.setIdentifier(path); form.add(validator); } return validator; }