One of the problems with 'previous page' would be determining what a page is exactly. When is a page a page? Is it in sync with a Page class? Or a version? For example, if you are on a page and re-render that same page, but do a panel replacement or set the visibility flags of some component. These changes have to be rolled back; something that Wicket hides from you.
It is a much better idea (type safe) to pass in the page you want to navigate back to. Eelco On 6/14/06, Ronald Dekker <[EMAIL PROTECTED]> wrote: > Hi all, > > We're using the following code to populate a link to the previous page > (mimicking the back button, as it were): > > private Page getPreviousPage() { > PageMap defaultPageMap = > getSession().getDefaultPageMap(); > ArrayListStack accessStack = > defaultPageMap.getAccessStack(); > PageMap.Access access = (Access) > accessStack.get(accessStack.size()-2); > Page page = > defaultPageMap.getEntry(access.getId()).getPage(); > return page; > } > > Is this really the neatest/cleanest way of doing this in Wicket? We'd kind of > expected a convenience method like "getSession().getPreviousPage()". > > Cheers, > Ronald & Joris > > Developement Team > Huygens Institute - KNAW > The Hague - The Netherlands > > > > _______________________________________________ > Wicket-user mailing list > Wicket-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/wicket-user > _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user