Hi, I'm currently trying to use RestartResponseAtInterceptPageException with Ajax. More precisely, I show a component that refreshes itself after executing an authorized action. It the user is not authorized to execute this action, I'd like to redirect him to the Login-Page. After proper login, the user should be redirected to the original page. However, using continueToOriginalDestination() does not work (out of the box), as the User is redirected to the URL of the Ajax request.
Workaround/Possible changes to simplify workaround: A custom workaround would be to do a custom PageMap implementation. However, as the method setUpRedirect(RequestCycle) is private, deriving from the default PageMap will require some ugly copy-paste in order to do so. This could be avoided by a) making setUpRedirect(RequestCycle) protected and/or b) introduce a protected method that constructs the interceptContinuationURL inside setUpRedirect(RequestCycle). Changing default behaviour: The workaround version is not trivial, as in requires quite a bit of knowledge of Wicket's inner workings ("What the hell is a PageMap?"). Therefore, it might be a good idea to change the default behaviour there, as no user wants to see Ajax responses at all (well, at least no normal user - I really enjoy their unrivalled beauty ;) ). Shouldn't the behaviour be somewhat more intelligent by default (without hacking a custom PageMap)? That is to redirect to the page the Ajax request belonged to? Or even better: redirect to the Ajax call and render the complete page (well, don't know how tricky that would be). Or do I miss something completely? Any other possible workarounds or suggestions? Cheers, Stefan ----- ------- Stefan Fußenegger http://talk-on-tech.blogspot.com // looking for a nicer domain ;) -- View this message in context: http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-tp15607225p15607225.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]