Yes, since the anon-inner class introduces a link between the two. modify the isVisible() to:
return ((Recommendation)recommendationModel.getObject()).getSupplier() == null; or rather, implement a method "Recommendation getCurrentRecommendation() { return ((Recommendation)recommendationModel.getObject());} and use that instead. Martijn On Wed, Nov 26, 2008 at 10:52 AM, jhp <[EMAIL PROTECTED]> wrote: > > In that place, it compiles without it, but I have another class that has > something like this: > final Recommendation currentRecommendation = (Recommendation) > recommendationModel.getObject(); > . > . > . > add(new Label("usersChoice", getUsersChoiceString(name.getFirstname())) { > @Override > public boolean isVisible() { > return currentRecommendation.getSupplier() != null; > } > }); > > And it doesn't compile without final. so does that mean that this is the > place which forces the recommendation object to be stored in the session? If > so, I have to admit that I missed it entirely. > > Jukka > > > Johan Compagner wrote: >> >> if you make this: >> >> final Recommendation recommendation = (Recommendation) >> item.getModelObject(); >> >> not final does it compile? >> >> If it doesnt then you have a leak >> >> johan >> > > -- > View this message in context: > http://www.nabble.com/Wicket-Session-grows-too-big-real-fast-tp20697077p20697806.html > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.3.4 is released Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]