This question follows this: handling to onchange event of AutoCompleteTextField in wicket
I\'m trying to use the AutoCompleteTextField with a custom class as the gen
This is unrelated to the event handler, it is caused by the lack of a model type set in your component.
Form components can derive the model type from 3 sources:
PropertyModel
or a CompoundPropertyModel
.setType()
method.These are your options, you can choose any of the three, but I think 1 is better than 2, which is better than 3.
Update: You probably already know this but if your custom class is really custom, you'll also need an IConverter
that handles the String<->Someclass conversions: you can either register it with the application or override your component's getConverter(Class> clazz )
method to return it.