it is not recommended to pass models between pages because if the model is anonymous it can carry with it a reference to the other page object and your session size will spike because your page also has a reference to the previous page.
so no, it shouldnt be that. -igor On Mon, Aug 9, 2010 at 12:19 AM, Leszek Gawron <lgaw...@mobilebox.pl> wrote: > On 2010-08-09 05:32, Igor Vaynberg wrote: >> >> final Customer customer = item.getModelObject(); >> ... Link link = new Link("link") { >> public void onClick() { >> setResponsePage(new CustomerPage(customer)); >> >> the line above holds on to the customer object, so the Link subclass >> has a reference to customer. instead >> ... Link link = new Link("link", item.getmodel()) { >> public void onClick() { >> >> setResponsePage(new >> CustomerPage((Customer)getmodelobject())); > > shouldn't it actually be : > > Link link = new Link( "link, item.getModel() ) { > public void onClick() { > setResponsePage( new CustomerPage( getModel() ) ); > } > } > > ? > > -- > Leszek Gawron http://www.mobilebox.pl/krs.html > CTO at MobileBox Ltd. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org