I'd wrap the getModel().getObject() in accessor methods to hide the fact that you do that. getContract() is so much more legible than getModel().getObject()
Martijn On Fri, Mar 26, 2010 at 10:59 AM, Martin Sachs <sachs.mar...@gmail.com> wrote: > Yes we use LoadableDetachableModel. But we also do some times > getModel().getObject() deeper in hierarchy inside the construction, to > e.g. set the visibility of a panel or to create just the right panel, > instead of creating e.g. ten panels and implement isVisible(). > > Martin > > > Jan Kriesten schrieb: >> Hi Martin, >> >> >>> One reason for loading some data in contstructur or onBeforeRender is to >>> prevent creating huge hierarchies. This is faster than override >>> isVisible(), since isVisible would called more than one times. >>> >> >> why are you loading data in the component at all? There is this nice >> 'LoadableDetachableModel' which could/should wrap that... >> >> Best regards, --- Jan. >> >> >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.4 --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org