Hah, that's funny. Seems that this was a bug in MostRecentlyUsedMap all
the time. From HEAD/ 1.0 rc3, you shouldn't have to use this hack
anymore, as the map is allways updated automatically.
Eelco
Eelco Hillenius wrote:
Hi,
There is a simple trick you can use. It's a bit of a hack maybe, but
it works:
add(new Link("cancelButton")
{
public void onClick()
{
// put search page in front of the queue again
searchCDPage.getPageMap().put(searchCDPage);
setResponsePage(searchCDPage);
}
});
Here, searchCDPage is the page object I reuse. The trick is here that
when you want to reuse it, you have to put it at front of the list of
pages that are in the session.
Btw, The pages are stored in
wicket.util.collections.MostRecentlyUsedMap, which is one of the
coolest examples of the JDK's collections framework IMO. Check it out!
Good luck,
Eelco
Matej Knopp wrote:
Hi
I know it's been discussed here already, but still I coudln't find a
solution.
The problem is that I've a detail page from which I want to have link
to master page.
The link is done like this:
add (new PageLink ("back", new IPageLink () {
public Page getPage () {
return back;
}
public Class getPageIdentity () {
return back.getClass ();
}
}));
back contains reference to master page. The problem is that master's
page always expires after 10 detail pages are rendered.
How can I (if there is a way) move the page to the front of session
pages (so that other pages would expire sooner)?
Recreating master page using BookmarkableLink is not a solution,
since I need the master page remember it's state.
Thanks
-Matej Knopp
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great
events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great
events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user