Re: is this a bug in ModelT?

2010-06-16 Thread Wilhelmsen Tor Iver
 it is a bug, open a jira issue

Or a feature? Either it should use getObject() internally or Model.getObject() 
should be declared final to prevent the programmer from thinking he can 
override it - both will solve the issue.

- Tor Iver

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



is this a bug in ModelT?

2010-06-15 Thread Alex Rass
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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: is this a bug in ModelT?

2010-06-15 Thread Martin Makundi
I did something similar and it works.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: is this a bug in ModelT?

2010-06-15 Thread Alex Rass
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 ModelT 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:martin.maku...@koodaripalvelut.com] 
Sent: Tuesday, June 15, 2010 6:11 AM
To: users@wicket.apache.org
Subject: Re: is this a bug in ModelT?

I did something similar and it works.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: is this a bug in ModelT?

2010-06-15 Thread Martin Makundi
I concur.

**
Martin

2010/6/15 Alex Rass a...@itbsllc.com:
 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 ModelT 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:martin.maku...@koodaripalvelut.com]
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?

 I did something similar and it works.

 **
 Martin

 2010/6/15 Alex Rass a...@itbsllc.com:
 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: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



RE: is this a bug in ModelT?

2010-06-15 Thread Rodolfo Hansen
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 ModelT 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:martin.maku...@koodaripalvelut.com] 
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?
 
 I did something similar and it works.
 
 **
 Martin
 
 2010/6/15 Alex Rass a...@itbsllc.com:
  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: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org
 




Re: is this a bug in ModelT?

2010-06-15 Thread Igor Vaynberg
it is a bug, open a jira issue

-igor

On Tue, Jun 15, 2010 at 9:03 AM, Rodolfo Hansen kry...@gmail.com 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 ModelT 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:martin.maku...@koodaripalvelut.com]
 Sent: Tuesday, June 15, 2010 6:11 AM
 To: users@wicket.apache.org
 Subject: Re: is this a bug in ModelT?

 I did something similar and it works.

 **
 Martin

 2010/6/15 Alex Rass a...@itbsllc.com:
  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: users-unsubscr...@wicket.apache.org
  For additional commands, e-mail: users-h...@wicket.apache.org
 
 

 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org



 -
 To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
 For additional commands, e-mail: users-h...@wicket.apache.org





-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: is this a bug in ModelT?

2010-06-15 Thread avrahamr

Another option would be to directly implement IModelT.

On Tue, Jun 15, 2010 at 7:04 PM, Rodolfo Hansen [via Apache Wicket] 
ml-node+2256139-803998731-293...@n4.nabble.comml-node%2b2256139-803998731-293...@n4.nabble.com
 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 ModelT 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:[hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=0]

  Sent: Tuesday, June 15, 2010 6:11 AM
  To: [hidden email]http://user/SendEmail.jtp?type=nodenode=2256139i=1
  Subject: Re: is this a bug in ModelT?
 
  I did something similar and it works.
 
  **
  Martin
 
  2010/6/15 Alex Rass [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=2:

   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: [hidden 
   email]http://user/SendEmail.jtp?type=nodenode=2256139i=3
   For additional commands, e-mail: [hidden 
   email]http://user/SendEmail.jtp?type=nodenode=2256139i=4
  
  
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=5
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=6
 
 
 
  -
  To unsubscribe, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=7
  For additional commands, e-mail: [hidden 
  email]http://user/SendEmail.jtp?type=nodenode=2256139i=8
 




 --
  View message @
 http://apache-wicket.1842946.n4.nabble.com/is-this-a-bug-in-Model-T-tp2255650p2256139.html
 To start a new topic under Wicket - User, email
 ml-node+1842947-1647783149-293...@n4.nabble.comml-node%2b1842947-1647783149-293...@n4.nabble.com
 To unsubscribe from Wicket - User, click 
 herehttp://apache-wicket.1842946.n4.nabble.com/subscriptions/Unsubscribe.jtp?code=YXZyYWhhbXJAZ21haWwuY29tfDE4NDI5NDd8LTEwNzY0NzQ1ODc=.





-- 
[]'s
Avraham Rosenzweig
avrah...@gmail.com

-- 
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/is-this-a-bug-in-Model-T-tp2255650p2256282.html
Sent from the Wicket - User mailing list archive at Nabble.com.