I have changed DropDownChoice field to AutoCompleteTextField and getting above error. Before, DropDownChoice was like,
DropDownChoice<MyObject> ddcObject = new DropDownChoice<MyObject>("myObjectName", new PropertyModel<MyObject>(mynewModel, "myObject"), myObjectModel, new ChoiceRenderer<MyObject>("name", "objectId"));
After, changed to AutoCompleteTextField is like,
AutoCompleteTextField<String> ddcObject = new AutoCompleteTextField<String>("myObjectName", new PropertyModel<String>(mynewModel, "myObject.name"), autoCompleteSettings)
{
@Override
protected Iterator<String> getChoices(String objectName)
{
......
}
};
Can anyone suggest what is missing, and how it should be corrected ?
In simple words, how to use wicket autocompetetextfield which will use model other than string, I want to show name in the field, but in the model I want to save the objectId, the same thing is achieved in DropDownChoice by using ChoiceRenderer. Please suggest.