Hi , I found no "IPageReference" class . If you mean PageReference , I finally found the solution: http://pastebin.com/bes3H9w3
Though the solution seems not so intuitional compared to wicket 1.4 2013/5/7 Martin Grigorov <[email protected]> > Hi, > > You should not keep references to other page instances. > Instead pass IPageReference: page.getPageReference(). > Later you can do: > MyPage page = (MyPage) pageRef.getPage(); > page.setXyz(); > > > But in your case I think you should use the Session. If the login is > successful then bind a session and set the flag. Then redirect to LoginPage > and in its constructor check whether there is a session, and whether the > flag is set and redirect to the post-login page. > > > > On Tue, May 7, 2013 at 4:03 AM, smallufo <[email protected]> wrote: > > > I have a LoginModal which binds a LoginPage . > > > > In LoginModal.setWindowClosedCallback() method , I use > > LoginPage.isSuccessful() to judge if the user login successful. > > If login successful , I refresh the page , or do nothing. > > > > LoginModal code : http://pastebin.com/nLU2akzV > > LoginPage code : http://pastebin.com/PqfLwsNg > > > > It works in wicket 1.4 , but failed in wicket 6 > > > > In LoginPage , I can see user correctly login , and the "successful = > true" > > is set. > > But LoginModal can only see the old successful value (which is FALSE). > > No matter I read the property (isSuccessful() ) or through reflection > > PropertyModel : > > boolean successful = (new PropertyModel<Boolean>(loginPage, > "successful")). > > getObject().booleanValue(); > > > > It just returns FALSE. > > > > I notice it may be page serialization problem introduced in wicket 1.5 . > > My page has an integer attached , such as /app/?1 , no matter how I > refresh > > the page , I just see the LoginPage's isSuccessful is FALSE. > > But if I manually browse /app/ (no trailing integer) , the user is logged > > in. (I set something in the httpSession in LoginPage) > > > > I searched the maillist , try to override *isVersioned() and return > false*, > > but everything is the same.... > > > > How to solve the problem , making LoginModal able to see LoginPage's > latest > > property ? > > > > Thanks ! > > > > > > -- > Martin Grigorov > Wicket Training & Consulting > http://jWeekend.com <http://jweekend.com/> >
