Yeah this will work, thanks. I did fear that somebody came around with that 
proposal ;-)

It would feel more „natural" if PropertyResolver/PropertyModel would care about 
calling model.getObject() (if the target value is an instance of IModel) though.

   Tom


> On 11.11.2015, at 10:51, Ernesto Reinaldo Barreiro <[email protected]> wrote:
> 
> What happens if you user "someModel.object"?
> 
> On Wed, Nov 11, 2015 at 10:48 AM, Tom Götz <[email protected]> wrote:
> 
>> 
>> Hi there,
>> 
>> I have the following situation:
>> 
>> 
>> MyClass extends Panel {
>> 
>>   private IModel<String> someModel;
>> 
>>   MyClass(String id) {
>>      super(id);
>>      add(new Label(„label“, PropertyModel.of(this, „someModel“));
>>   }
>> 
>> }
>> 
>> 
>> But instead of displaying someModel’s modelObject, the Label displays
>> someModel.toString(), which is how PropertyResolver is implemented (does
>> not check if value instance IModel …). Is there a best practice how to
>> handle such constructs?
>> 
>> Cheers,
>>   Tom
>> 
>> 
> 
> 
> -- 
> Regards - Ernesto Reinaldo Barreiro





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to