I am not sure we all agree on this change being for the better.

Personally, I doubt if it gets easier to use for people. What I like about IModel as it is now, is that it really is the basic form a model can have. On the other hand, I agree that what you propose would be more efficient.

I am currently more in favor of keeping thing the way they are, but if I'd see some really good examples - besides just efficiency - of why this would be a better general pattern, I might be convinced. Just speaking for myself ofcourse.

And why not just create your own model (or put it in contrib for that matter) like:

public abstract class IdModel implements IModel
{
   private final Serializable id;

   public IdModel(Serializable id)
   {
       this.id = id;
   }

   public final Object getObject()
   {
       return onGetObject(id);
   }

   public abstract Object onGetObject(Serializable id);

   public final void setObject(Object object)
   {
       onSetObject(id, object);
   }

   public abstract void onSetObject(Serializable id, Object object);

That would do what you want... you'd just need to feed components this model instead of using the constructors that create models for you. Or am I missing something here?

Eelco

Its what I was suggesting, so how does this continue? Can we be of help
making these changes?

Jan






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop

Reply via email to