I concur.

**
Martin

2010/6/15 Alex Rass <[email protected]>:
> No, Martin, it can't work.
> Look at the implementation.
>
> ALL other methods use object directly.
> SO if you just override getObject you'll endup with a broken:
> equals(), hashCode(), toString() methods (which breaks any form of caching)
> detach() would also be broken.
>
> So no, it can't work.
> You HAVE to super.setObject() or setObject() directly and use internal
> object to use Model<T> class.
> Which is not deadly, but a "need to know".
>
> Hence: is it a bug or a feature?
> Igor? :)
>
> - Alex
>
>
> -----Original Message-----
> From: Martin Makundi [mailto:[email protected]]
> Sent: Tuesday, June 15, 2010 6:11 AM
> To: [email protected]
> Subject: Re: is this a bug in Model<T>?
>
> I did something similar and it works.
>
> **
> Martin
>
> 2010/6/15 Alex Rass <[email protected]>:
>> Hi.
>>
>> Was writing some code and encountered that
>> org.apache.wicket.model.Model <T>
>>
>> Always uses direct references to 'object' variable directly. And never
>> as getObject().
>> This may hinder overriding methods.
>>
>> (I found this cause I overwrote getObject() and NOTHING changed :) I
>> then looked at the source and knew how to fix it)
>>
>> Bug or feature?
>>
>> This is Wicket 1.4.7
>>
>> - Alex
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

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

Reply via email to