However, wicket never calls the getConverter() method and simply uses
SomePOJO.toString() to retrieve the text for the choices. What am I
doing wrong?
One possibility is that in all the nested classes in the typical
Wicket source file you have added the method to the wrong class. Try
adding @Override to indicate that you intend to override a superclass
method, and see if the compiler or IDE complains
Good idea but unfortunately that's not it. The method in the correct
place (within an anonymous class extending AutoCompleteTextField) and
already has an @Override.
In fact, the converter does get called, but only after I've made a
selection. By then, the "type" argument is already a java.lang.String.
After looking at Wicket's source code, I've found that AutoTextField
does not use converters. Instead, you need to declare a renderer as follows:
IAutoCompleteRenderer<SomePOJO> myRenderer = new
AbstractAutoCompleteTextRenderer<SomePOJO>() {
@Override
protected String getTextValue(SomePOJO object) {
return ....;
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]