it is a bug, open a jira issue -igor
On Tue, Jun 15, 2010 at 9:03 AM, Rodolfo Hansen <[email protected]> wrote: > Are you sure you want to override Model in the first place? > Di you see LoadableDetachableModel ? > > Model is not ment to be an abstract class, > I would argue its not a bug, but that would be a whole other debate... > > On Tue, 2010-06-15 at 06:56 -0400, Alex Rass wrote: > >> 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]
