java.lang.Object
org.apache.wicket.pageStore.DelegatingPageStore
org.apache.wicket.pageStore.GroupingPageStore
- All Implemented Interfaces:
IPageStore
An
IPageStore
that groups pages.
By default all pages are stored in a single group, you'll have to override getGroup(IManageablePage)
to provide the actual group
for a stored page, e.g. using a single group for all pages inside a single browser tab.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addPage
(IPageContext context, IManageablePage page) Stores the page-protected String
getGroup
(IManageablePage page) Get the group of a page, default is"default"
getPage
(IPageContext context, int id) Restores a page from storage.void
removeAllPages
(IPageContext context) All pages should be removed from storage for the given context.void
removePage
(IPageContext context, IManageablePage page) Removes a page from storage.Indicate that groups are stable, i.e. the group of a page never changes.Methods inherited from class org.apache.wicket.pageStore.DelegatingPageStore
destroy, detach, end, getDelegate, revertPage, supportsVersioning
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.wicket.pageStore.IPageStore
canBeAsynchronous
-
Constructor Details
-
GroupingPageStore
- Parameters:
delegate
- store to delegate tomaxGroups
- maximum groups to keep
-
-
Method Details
-
withStableGroups
Indicate that groups are stable, i.e. the group of a page never changes. -
getGroup
Get the group of a page, default is"default"
- Returns:
- group of page, must not be empty
-
addPage
Description copied from interface:IPageStore
Stores the page-- Specified by:
addPage
in interfaceIPageStore
- Overrides:
addPage
in classDelegatingPageStore
- Parameters:
context
- the context of the pagepage
- the page.
-
removePage
Description copied from interface:IPageStore
Removes a page from storage.- Specified by:
removePage
in interfaceIPageStore
- Overrides:
removePage
in classDelegatingPageStore
- Parameters:
context
- the context of the pagepage
- the page.
-
removeAllPages
Description copied from interface:IPageStore
All pages should be removed from storage for the given context.- Specified by:
removeAllPages
in interfaceIPageStore
- Overrides:
removeAllPages
in classDelegatingPageStore
- Parameters:
context
- the context of the pages
-
getPage
Description copied from interface:IPageStore
Restores a page from storage.- Specified by:
getPage
in interfaceIPageStore
- Overrides:
getPage
in classDelegatingPageStore
- Parameters:
context
- the context of the pageid
- the id of the page.- Returns:
- the page
-