You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Gytis <li...@mail.ru> on 2012/11/02 12:29:44 UTC

Opening new tab causes model to be null

Hello, I have noticed one problem and cannot say how is that happening.
I have a page, which contains form with two DropDowns with AJAX behaviours
on them.
When I select something from first dropdown, AJAX sets some values on other
dropdown.
To get a value from dropDown I use CompoundPropertyModel, and everything
works fine.
But when I open that page in another tab (using Firefox), and select
something from first dropdown, NullPointer exception appears and as I
debugged it seems that my CompoundPropertyModel is null.

How is that happens and how to get rid of it?



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Opening-new-tab-causes-model-to-be-null-tp4653565.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


RE: Opening new tab causes model to be null

Posted by Paul Bors <pa...@bors.ws>.
Fix the NPE :)

Try lazy loading the model.

~ Thank you,
  Paul Bors

-----Original Message-----
From: Gytis [mailto:lietuviss66@mail.ru] 
Sent: Friday, November 02, 2012 7:30 AM
To: users@wicket.apache.org
Subject: Opening new tab causes model to be null

Hello, I have noticed one problem and cannot say how is that happening.
I have a page, which contains form with two DropDowns with AJAX behaviours
on them.
When I select something from first dropdown, AJAX sets some values on other
dropdown.
To get a value from dropDown I use CompoundPropertyModel, and everything
works fine.
But when I open that page in another tab (using Firefox), and select
something from first dropdown, NullPointer exception appears and as I
debugged it seems that my CompoundPropertyModel is null.

How is that happens and how to get rid of it?



--
View this message in context:
http://apache-wicket.1842946.n4.nabble.com/Opening-new-tab-causes-model-to-b
e-null-tp4653565.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org