I am creating an input field that should accept numbers only, so I defined my TextField component as follows,
TextField<Number>(String markupId, IModel<Number> model) I am "forcing" the model update by adding AjaxFormComponentUpdatingBehavior("onblur")... The model doesn't appear to be getting updated (works okay if defined as TextField<String>). I am wondering if the alternate constructor format is required to make it work with types not derived from a String, as in, TextField<Number>(String markupId, IModel<Number> model, Number.class) // explicitly specify the type I thought moving to support generics in wicket eliminated the need for this kind of syntax. Is specifying the type (e.g., class) the solution, or do I need to add a specific type converter for type Number??? Thanks, J.D.