开发者

detecting intercept in wicket w/o calling continueToOriginalDestination()

I created a SimplePageAuthorizationStrategy that redirects an unauthorized u开发者_如何学编程ser to my LoginPage.class to authenticate / authorize and then in the onSubmit() I use continueToOriginalDestination() to forward the request to the original destination (e.g. a mount() or BookmarkablePageLink). It works correctly.

Now I would like to add an message on the page to the effect of:

Please log in before continuing to "http://server/protected".

Rather than the usual "Please log in!" when the user gets to the login page this way.

How can I detect if the LoginPage.class has intercepted this request during the constructor in order to add this feedback? Calling continueToOriginalDestination() is not the answer, that seems to redirect right away, correct?

Thanks.


This information is well encapsulated and it is hard to read it. You can set your own flag in the session before redirecting to LoginPage and reset it after read.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜