Hi, I was just trying to create a component of my own which - in some of my pages - is created without a model. In the initModel() method I would then call super.initModel() and wrap the resulting model for use in a child component. The problem is the initialization order:
The child model's initModel() gets called first, the parent (my custom component) does not yet have a model (getModelImpl() returns null) so it goes up farther in the component hierarchy and retrieves a wrong model. Looking at the Component source code (Wicket 1.4.1) I see a commented out line where initModel() used to to call the parent getModel() instead of getModelImpl(). There's also a comment explaining that doing so would "initialize many inbetween completely useless models". Well, not so useless for what I am trying to do I guess. So, from my perspective this looks like a bug that causes necessary initialization to be bypassed. Obviously though it was done like that on purpose, so I decided to put the issue up here instead of filing a bug report. Has anyone else run into similar issues? Would it really be so bad to just call getModel()? Cheers Edmund -- Liland ...does IT better Liland IT GmbH Software Architekt email: edmund.urb...@liland.at office: +43 (0)463 220111 | fax: +43 (0)463 220111 33 | mobil: +43 (0)699 122011 16 http://www.Liland.at --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org