On 2010-08-09 18:18, Igor Vaynberg wrote:
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.

that is why I use model classes which are nested private static and get the best out of both approaches.

Still I thought that you have been debating on "smart serialization of anonymous models" and making them safe to use. Am I wrong?


-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()));


--
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

Reply via email to