2008/5/11 Maurice Marrink <[EMAIL PROTECTED]>:

> PropertyModel is aware of the IModel you are passing and unwraps it.
> So depending on what is inside your model you have different options:
> -the model contains an object x which has a city property:
>  make sure x has a getter and setter for city this will be used by the
> propertymodel
> -the model contains a city object:
>  do not use a propertymodel at all or use "" as the expression.
>

This (second) is my situation.
This is my custom model object extends Model , which has getCity() ,
setCity(...) methods.
If I don't use PropertyModel , what should I do ?

And ... how to use "" as the expression ?
I tries this :
MyModel mymodel = (MyModel)model;
CityDropDownChoice = new CityDropDownChoice("city" , new
PropertyModel(myModel.getCity() , ""));

It still doesn't work , the selected value is not set to myModel.

Reply via email to