Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
I enter URL "http:///awol" which should direct to my application's home page which is set to be MainPage.class: My Application class sets the home page to be MainPage: public Class getHomePage() { return MainPage.class; } @Override protected C

Re: continueToOriginalDestination issue

2013-10-02 Thread Nick Pratt
Are you entering the URL of your main page or your login page? You also have to check if there is a continue-to-destination field set and if not you have to send your user to a default home page. N On Oct 2, 2013 8:18 PM, "shimin_q" wrote: > Thanks - that sounds exactly what I observed in my ca

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
Thanks - that sounds exactly what I observed in my case where the login page (HomePage class) gets redisplayed after I entered the user name and password. I am looking at some sample code with Stateless login forms, in addition to using StatelessForm instead Form, a bind() is called too after auth

Re: continueToOriginalDestination issue

2013-10-02 Thread Nick Pratt
No - it the login page was redisplayed. N On Oct 2, 2013 6:31 PM, "shimin_q" wrote: > Just to make sure the problem I am seeing is due to the timed out Login > page...when you say > > "the original login page displayed would have timed out and the attempted > login wont succeed." > > When your a

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
Just to make sure the problem I am seeing is due to the timed out Login page...when you say "the original login page displayed would have timed out and the attempted login wont succeed." When your attempted login failed, does another page come up with some generic browser error message or does i

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
OK, could it be as simple as changing the following line: public class LoginForm extends Form to public class LoginForm extends StatelessForm as you can see my login page (HomePage class) is really simple (only 3 components: a label, a LoginForm, a FeedbackPanel), right? Thanks, Shi-Min

Re: continueToOriginalDestination issue

2013-10-02 Thread Nick Pratt
Any components on your Page that aren't stateless cause the Page containing them to be Stateful- Forms are stateful by default. Add this to your page's onInitialize() and it will help you see what's going on. Check out Wicket's StatelessForm class. @Override protected void onInitialize() { supe

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
This could explain the intermittent nature of the problem. Thanks, Nick! Could you elaborate on what you mean by stateless login page? Here is my Login page and Login Form inside it. Could you please tell me what I need to change? public class HomePage extends WebPage { public HomePag

Re: continueToOriginalDestination issue

2013-10-02 Thread Marcel Hörr
hi, my original post was sent to smqian directly (stupid mobile email client). i suggested to use a "setResponsePage(new MainPage());" after continueToOriginalDestination. but this is rather a workaround than a solution, right? best regards marcel Am 02.10.2013 um 19:28 schrieb shimin_q : >

Re: continueToOriginalDestination issue

2013-10-02 Thread Nick Pratt
One thing to check is if your login page is stateless. If its not, and you attempt to login using your login page some time after your initially loaded the page in the browser, then the original login page displayed would have timed out and the attempted login wont succeed. Ive seen this behavior

Re: continueToOriginalDestination issue

2013-10-02 Thread Martin Grigorov
On Wed, Oct 2, 2013 at 8:30 PM, shimin_q wrote: > Hi Martin, > > No, I did not use that. > > My understanding is that the URL ("http:///awol") takes me > to > my app's home page (MainPage.class), but is intercepted by the login page > define "is intercepted" what logic does the redirect ? > (H

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
Hi Martin, No, I did not use that. My understanding is that the URL ("http:///awol") takes me to my app's home page (MainPage.class), but is intercepted by the login page (HomePage.class in my case). After login is successful, the continueToOriginalDestination() SOMETIMES does not seem to con

Re: continueToOriginalDestination issue

2013-10-02 Thread shimin_q
Here is the flow of my app: My Application class sets the home page to be MainPage: > public Class getHomePage() { > return MainPage.class; > } > > @Override > protected Class getSignInPageClass() { > return HomePage.class; >

Re: continueToOriginalDestination issue

2013-10-02 Thread Martin Grigorov
Hi, Do you use RestartResponseAtInterceptPageException in your authorization strategy ? On Wed, Oct 2, 2013 at 7:28 PM, shimin_q wrote: > Hello, > > My homepage URL is "http:///awol", and it is linked to > MainPage.html and MainPage.java. I also have a HomePage.html/HomePage.java > that is es

Re: continueToOriginalDestination issue

2013-10-02 Thread Francois Meillet
Hi, How user arrives to the HomePage.class ? By the security layer or by a link ? If it's by a link, continueToOriginalDestination will send the user to the original destination, which is HomePage.class. François Le 2 oct. 2013 à 19:28, shimin_q a écrit : > Hello, > > My homepage URL is

continueToOriginalDestination issue

2013-10-02 Thread shimin_q
Hello, My homepage URL is "http:///awol", and it is linked to MainPage.html and MainPage.java. I also have a HomePage.html/HomePage.java that is essentially a login page and contains a LoginForm. public Class getHomePage() { return MainPage.class; } @Ove

Re: Question regarding ResourceBundles and relative paths

2013-10-02 Thread Martin Grigorov
Hi, The method signature is: ResourceBundles#addCssBundle(Class scope, String name, CssResourceReference... references) I.e. the 'scope' is uses as ... as scope. So you can use any Class that will fit your needs. com.example - MyClass - res/css/{a,b,c}.css - res/images/{d,e,f}.png then us

Question regarding ResourceBundles and relative paths

2013-10-02 Thread Marcel Hoerr
hi wicket community! i have a question regarding the usage of ResourceBundles. consider the following use case: i want to add a ResourceBundle in my wicketapplication class with a css file (and some relative paths to images/fonts in it). right now i add the ResourceBundle with application scope