However setObject() doesn't work as well on AbstractReadOnlyModel as
it does on Model, which is particularly important for immutable
backing objects such as Strings.
On Tue, Oct 21, 2008 at 2:35 AM, Johan Compagner <[EMAIL PROTECTED]> wrote:
> we have also AbstractReadOnlyModel for that
> so igor are you sure you dont want to have Model final? :)
>
>
> On Mon, Oct 20, 2008 at 5:02 PM, Igor Vaynberg <[EMAIL PROTECTED]>wrote:
>
>> whenever there is something nonfinal people will always find a way to
>> misuse it.
>>
>> model methods are not final because it gives you a simple base class
>> to subclass instead of starting from scratch with an imodel.
>>
>> -igor
>>
>> On Mon, Oct 20, 2008 at 6:37 AM, Ricky <[EMAIL PROTECTED]> wrote:
>> > Hi,
>> >
>> > Is there any reason getObject and setObject were not made final in Model
>> > class? the reason why i am asking is that there might be the case when
>> > people misuse this; for example (and i have seen this at my current
>> > workplace);
>> >
>> > Model xModel = new Model(new Long(1)) {
>> >
>> > @Override
>> > public Object getObject() {
>> > // return super.getObject(); <-- not calling this, instead
>> i
>> > return null
>> > return null;
>> > }
>> > };
>> >
>> > // some lines afterwards ... i need this model ... i use it
>> > (expecting to get back object i set)
>> > // instead i get null. Original intent was to set object passed in
>> > and get the same thing ...
>> > System.out.println(xModel.getObject());
>> >
>> > Here i get null as the result.
>> >
>> > Any suggestions?
>> >
>> > Regards
>> > Vyas, Anirudh
>> >
>>
>> ---------------------------------------------------------------------
>> 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]