> WicketMessage: Exception 'java.lang.ClassCastException: > java.lang.Integer' occurred during validation > org.apache.wicket.validation.validator.RangeValidator on component > 2:body:recvAnalisysForm:intField Root > cause:java.lang.ClassCastException: java.lang.Integer at > java.lang.String.compareTo(String.java:90)
According to the error message, the validator gets a String value here; have you checked the actual IModel used by the field? The default Model for *TextField uses String IIRC... IModel<Integer> model = new PropertyModel<Integer>(theBean, "intField"); RequiredTextField<Integer> intField = new RequiredTextField<Integer>("intField", model); intField.add(new RangeValidator<Integer>(0, 100)); --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org