You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by armandoxxx <ar...@dropchop.com> on 2013/03/16 10:02:19 UTC

AbstractAjaxBehavior back button problem

Hey I have a tiny little problem with ajax behaviors and back button. 

I have a component (jQuery date picker that makes an ajax call to wicket
with selected date as parameter) which has an ajax behavior and renders it's
callbackUrl to head !

taken from components code:


If I select dates with this component and stay on the same page everything
works. 
If I go to next page and press back button Ajax request made by selecting a
date throws me:

org.apache.wicket.core.request.mapper.StalePageException
and I'm redirected on error page.

By debuging I figured out that when selecting a date (on page that I got to
by pressing back button) the whole page reloads and my behavior is not
called due to StalePageException...
Any tips to overcome this would be appreciated. 

Regards 

Armando





--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293.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: AbstractAjaxBehavior back button problem

Posted by armandoxxx <ar...@dropchop.com>.
tiniy little detail to mention ... 

I'm using wicket 6.6.0 

Regards

Armando



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293p4657294.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: AbstractAjaxBehavior back button problem [SOLVED]

Posted by armandoxxx <ar...@dropchop.com>.
Ok .. here is the solution !


When rendering Ajax callbackUrls you have to be careful that everytime
component is rendered you call behavior.getCallbackUrl() and set the new
value to javascript output !

Since I render urls in head tag ... with renderHead() method this is my
working example 




Regards

Armando



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293p4657297.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: AbstractAjaxBehavior back button problem

Posted by armandoxxx <ar...@dropchop.com>.
Next thing i tried was to put ULR creation code from head to panel html code
.. 

like this ... 


and Ajax call still throws
org.apache.wicket.core.request.mapper.StalePageException ...

There must be somone who solved this kind of case ... 

Regards

Armando



--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293p4657296.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