|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.PageMap
org.apache.wicket.AccessStackPageMap
public class AccessStackPageMap
A container for pages held in the session. IPageMap is a parameter to several methods in the Wicket API. You can get a IPageMap by name from a Session with Session.getPageMap(String pageMapName) or more conveniently with PageMap.forName(String pageMapName). But you should not hold onto a reference to the pagemap (just as you should not hold onto a reference to your Session but should get it each time you need it instead). Instead, create a strongly typed accessor method like this:
public IPageMap getMyPageMap() { return IPageMap.forName("myPageMapName"); }If the page map with the given name is not found, one will be automatically created.
Nested Class Summary | |
---|---|
static class |
AccessStackPageMap.Access
Holds information about a pagemap access |
Field Summary |
---|
Fields inherited from class org.apache.wicket.PageMap |
---|
DEFAULT_NAME |
Constructor Summary | |
---|---|
AccessStackPageMap(String name)
Constructor |
Method Summary | |
---|---|
void |
clear()
Removes all pages from this map |
boolean |
containsPage(int id,
int versionNumber)
Returns true if the PageMap contains page with given id and versonNumber |
Page |
get(int id,
int versionNumber)
Retrieves page with given id. |
ArrayListStack<AccessStackPageMap.Access> |
getAccessStack()
Returns a stack of PageMap.Access entries pushed in the order that the pages and versions were accessed. |
int |
getVersions()
|
IPageMapEntry |
lastAccessedEntry()
Gets the most recently accessed page map entry off the top of the entry access stack. |
void |
put(Page page)
|
void |
removeEntry(IPageMapEntry entry)
|
Methods inherited from class org.apache.wicket.PageMap |
---|
attributeForId, continueToOriginalDestination, dirty, forName, getEntry, getMetaData, getName, getSession, getSizeInBytes, isDefault, nextId, redirectToInterceptPage, redirectToInterceptPage, remove, remove, setMetaData, toString, visitEntries |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AccessStackPageMap(String name)
name
- The name of this page mapMethod Detail |
---|
public void clear()
clear
in interface IPageMap
clear
in class PageMap
IPageMap.clear()
public final ArrayListStack<AccessStackPageMap.Access> getAccessStack()
public final int getVersions()
public final IPageMapEntry lastAccessedEntry()
public void removeEntry(IPageMapEntry entry)
removeEntry
in interface IPageMap
removeEntry
in class PageMap
entry
- The entry to removeIPageMap.removeEntry(org.apache.wicket.session.pagemap.IPageMapEntry)
public Page get(int id, int versionNumber)
get
in interface IPageMap
get
in class PageMap
id
- The page identifierversionNumber
- The version to get
IPageMap.get(int, int)
public void put(Page page)
put
in interface IPageMap
put
in class PageMap
page
- The page to put into this mapIPageMap.put(org.apache.wicket.Page)
public boolean containsPage(int id, int versionNumber)
IPageMap
containsPage
in interface IPageMap
PageMap
contains a page with the given id and versionNumber
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |