on wicket's continueToOriginalDestination() method
what is the link between backbutton and continueToOriginalDestination(). method. how to keep url saved for continueToOriginalDestination() method while clcking browsers back butto开发者_C百科n.
continueToOriginalDestination()
is used when a request was (temporarily) redirected to an intercepting page, for example a login page. When a user requests a secured page but is not yet authenticated, the security framework that hooks into wicket (auth-roles, shiro, swarm/wasp) will present the user with a login page, and store the original URL. When the user has authenticated, you can call continueToOriginalDestination
and Wicket will process the original request, displaying the requested secured page.
Not only security frameworks can use this, you can do it yourself by throwing a RestartResponseAtInterceptPage
exception.
The back button has nothing to do with this, nor does it have any affect on the processing of the original destination page. Wicket keeps storing the original destination until a new one is set, or until continueToOriginalDestination
has been called.
continueToOriginalDestination
returns true
when there was a page to go to, and false
when the user landed on the intercept page directly (e.g. guessing the login page URL or clicking on a link pointing to the login page).
精彩评论