What are we going to do with this?

In my opinion these things should be fixed in CompoundPropertyModel:

* Use consistent naming. Currently, the field is called target, but
the the constructor argument is called model. We need to find the best
name and use this throughout the class.
* Once we decide on the field name, we should expose a getter and
setter for that field.
* I think the current setObject implementation is wrong. It should
either be like getObject, thus:
      if (target instanceof IModel) {
        ((IModel)target).setObject(object);
      } else {
        this.target = object; // yes, naming should change
      }
  or we should make this a read-only model.

WDYT?

Eelco

> Yes, that's it.
>
> Johan Compagner wrote:
> > ahh wait i see that the getObject does  a recursive call if it is a model
> > So you want the internal model instead of the real model object ?

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to