Hi Martin,

Is there any way to stop the redirection?

Our scenario is:

1. Three pages are opened at the same time, one in each browser tab.
2. The first one is evicted from the page store (the maximum pages for the
page store is set to 2)
3. An Ajax request (initiated by AjaxLazyLoadPanel) from the first page is
responded with "<ajax-response><redirect>..."
4. The first page is then redirected to somewhere else, which we don't want
to happen.

Wonder if there's any way to stop the redirection. That is, in our case, we
don't like the AjaxLazyPanel to be loaded, just don't do anything.

Can we stop the redirection in JavaScript like below:
Wicket.Event.subscribe('/ajax/call/complete', function(jqEvent, attributes,
jqXHR, errorThrown, textStatus) {
      if (jqXHR != null && jqXHR.responseText != null &&
jqXHR.responseText.match("<ajax-response><redirect>")) {
      // Do something to stop the redirection?
      }
    });

Or overwrite a certain method of AjaxLazyLoadPanel so as not to return
"<ajax-response><redirect>..." as the response?

Thank you,
Yuci

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-event-ajax-call-complete-check-if-ajax-response-is-a-redirect-to-a-new-page-tp4663869p4666323.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to