Turns out this bug was due to me not using a typed TextField (i.e. passing int.class to the constructor). I think wicket could probably handle this case a little more gracefully but it's partially user error.
Jean-Baptiste Quenot-3 wrote: > > * mperham: >> >> I've got an input field which accepts positive integers. I'm trying to >> test >> the validation logic on my page but receiving the following error. Am I >> misunderstanding how validation and type conversion work? In general I'm >> having trouble with any fields that accept non-String input (Numbers, >> Dates, >> etc). >> >> Caused by: java.lang.ClassCastException: java.lang.String >> at >> wicket.markup.html.form.validation.NumberValidator.validate(NumberValidator.java:205) >> at >> wicket.markup.html.form.FormComponent.validateValidators(FormComponent.java:1155) >> >> We are using 1.2.5. > > Can you try and reproduce this with Wicket 1.3.0-beta2? I'm > pretty sure this bug is no more. > -- View this message in context: http://www.nabble.com/FormTester-and-type-conversion-tf4014850.html#a11447735 Sent from the Wicket - User mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user