0

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.

1 Answers1

0

You should provide more context when asking questions; it is hard to tell why the property resolution fails if we can't see the code of the object on which it fails.

That particular exception is thrown when a setter cannot be resolved for the given property expression. Check if if the name property on the issueObject provides a setter.

Domas Poliakas
  • 836
  • 6
  • 19