Package org.apache.wicket
Interface IPageFactory
-
- All Known Implementing Classes:
DefaultPageFactory
public interface IPageFactoryA factory class that creates Pages. A Page can be created by Class, with or without a PageParameters argument to pass to the Page's constructor.IMPORTANT NOTE: Implementations must let subclasses of
ResetResponseExceptionthrown from the constructing page's constructor bubble up.- Author:
- Juergen Donnerstag, Jonathan Locke
- See Also:
Application.newPageFactory(),Session.getPageFactory()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <C extends IRequestablePage>
booleanisBookmarkable(java.lang.Class<C> pageClass)Checks whether a page can be instantiated using a bookmarkable URL.<C extends IRequestablePage>
CnewPage(java.lang.Class<C> pageClass)Creates a new page using a page class.<C extends IRequestablePage>
CnewPage(java.lang.Class<C> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists.
-
-
-
Method Detail
-
newPage
<C extends IRequestablePage> C newPage(java.lang.Class<C> pageClass)
Creates a new page using a page class.- Type Parameters:
C- the type of the page class- Parameters:
pageClass- The page class to instantiate- Returns:
- The page
- Throws:
WicketRuntimeException- Thrown if the page cannot be constructed
-
newPage
<C extends IRequestablePage> C newPage(java.lang.Class<C> pageClass, org.apache.wicket.request.mapper.parameter.PageParameters parameters)
Creates a new Page, passing PageParameters to the Page constructor if such a constructor exists. If no such constructor exists and the parameters argument is null or empty, then any available default constructor will be used.- Type Parameters:
C- the type of the page class- Parameters:
pageClass- The class of Page to createparameters- Any parameters to pass to the Page's constructor- Returns:
- The new page
- Throws:
WicketRuntimeException- Thrown if the page cannot be constructed
-
isBookmarkable
<C extends IRequestablePage> boolean isBookmarkable(java.lang.Class<C> pageClass)
Checks whether a page can be instantiated using a bookmarkable URL.- Type Parameters:
C- the type of the page class- Parameters:
pageClass- The class of page to check for bookmarkability- Returns:
trueif the page can be instantiated by thisIPageFactory
-
-