java.lang.Object
org.apache.wicket.DefaultMapperContext
- All Implemented Interfaces:
IMapperContext
,IPageSource
Wicket's default implementation for the mapper context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClass<? extends IRequestablePage>
Returns the home page class.getPageInstance
(int pageId) Returns existing page instance if the page exists.newPageInstance
(Class<? extends IRequestablePage> pageClass, PageParameters pageParameters) Creates new page instance of page with given class.
-
Constructor Details
-
DefaultMapperContext
public DefaultMapperContext()Constructor. Uses the thread local Application -
DefaultMapperContext
Constructor.- Parameters:
application
- the application instance to use
-
-
Method Details
-
getBookmarkableIdentifier
- Specified by:
getBookmarkableIdentifier
in interfaceIMapperContext
- Returns:
- identifier for bookmarkable URLs
-
getNamespace
- Specified by:
getNamespace
in interfaceIMapperContext
- Returns:
- the namespace for Wicket URLs.
-
getPageIdentifier
- Specified by:
getPageIdentifier
in interfaceIMapperContext
- Returns:
- identifier for non bookmarkable URLs
-
getResourceIdentifier
- Specified by:
getResourceIdentifier
in interfaceIMapperContext
- Returns:
- identifier for resources
-
getResourceReferenceRegistry
- Specified by:
getResourceReferenceRegistry
in interfaceIMapperContext
- Returns:
ResourceReferenceRegistry
-
newPageInstance
public IRequestablePage newPageInstance(Class<? extends IRequestablePage> pageClass, PageParameters pageParameters) Description copied from interface:IPageSource
Creates new page instance of page with given class. The page should be marked as create bookmarkable, so subsequent calls toIRequestablePage.wasCreatedBookmarkable()
must returntrue
- Specified by:
newPageInstance
in interfaceIPageSource
- Returns:
- new page instance
-
getPageInstance
Description copied from interface:IPageSource
Returns existing page instance if the page exists.- Specified by:
getPageInstance
in interfaceIPageSource
- Returns:
- page instance or
null
if the page does not exist.
-
getHomePageClass
Description copied from interface:IMapperContext
Returns the home page class.- Specified by:
getHomePageClass
in interfaceIMapperContext
- Returns:
- home page class
-