Re: How to retrieve previous path when page expires through Ajax call

2007-09-12 Thread Alfred Chan

Hi Eelco,

Do you mean to store the user's current URL path in his/her cookie every
time and retrieve it for restoring the path after the session expiration?

Thanks,
Alfred


Eelco Hillenius wrote:
 
 On 8/22/07, Alfred Chan [EMAIL PROTECTED] wrote:

 I would like to redirect the user to his/her previous visiting page in
 case
 of the session expiration.

 So, I wrote a customized expired error page to do so.

 public class ExpireRedirectPreviousPage extends WebPage {

 private static final long serialVersionUID = 1L;

 public ExpireRedirectPreviousPage() {
 // Redirect to original page
 getRequestCycle().setRequestTarget(
 new RedirectRequestTarget(getRequest().getPath()));
 }
 }

 It works fine with non-ajax requests. But, it doesn't work with ajax
 requests, the getRequest().getPath() can only get back an empty path.
 Finally, it will redirect to homepage, which is not desirable.

 Would someone tell me how to get back the client side URL/path after an
 ajax
 request in the expired error page?
 
 How about using a cookie for this?
 
 Eelco
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 

-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-previous-path-when-page-expires-through-Ajax-call-tf4310264.html#a12632955
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How to retrieve previous path when page expires through Ajax call

2007-09-12 Thread Eelco Hillenius
 Do you mean to store the user's current URL path in his/her cookie every
 time and retrieve it for restoring the path after the session expiration?

Something along those lines. Or maybe you can cut it down to just a
few important URLs that you set as a kind of save point/ just URLs to
bookmarkable pages.

Eelco

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



How to retrieve previous path when page expires through Ajax call

2007-08-22 Thread Alfred Chan

I would like to redirect the user to his/her previous visiting page in case
of the session expiration.

So, I wrote a customized expired error page to do so.

public class ExpireRedirectPreviousPage extends WebPage {

private static final long serialVersionUID = 1L;

public ExpireRedirectPreviousPage() {
// Redirect to original page
getRequestCycle().setRequestTarget(
new RedirectRequestTarget(getRequest().getPath()));
}
}

It works fine with non-ajax requests. But, it doesn't work with ajax
requests, the getRequest().getPath() can only get back an empty path.
Finally, it will redirect to homepage, which is not desirable.

Would someone tell me how to get back the client side URL/path after an ajax
request in the expired error page?

Thanks,
Alfred
-- 
View this message in context: 
http://www.nabble.com/How-to-retrieve-previous-path-when-page-expires-through-Ajax-call-tf4310264.html#a12270504
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]