|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectwicket.ApplicationPages
Holder for specifying Wicket page classes that have special meaning to an application, such as an application's home page and any error display pages.
homePage (required, no default) - You must set this property to the bookmarkable page that you want the framework to respond with when no path information is specified.
internalErrorPage - You can override this with your own page class to display internal errors in a different way.
pageExpiredErrorPage - You can override this with your own bookmarkable page class to display expired page errors in a different way. You can set property homePageRenderStrategy to choose from different ways the home page url shows up in your browser.
You can register aliases for bookmarkable pages by calling putClassAlias; this way you can point to bookmarkable pages with logical names instead of full class names.
| Nested Class Summary | |
static class |
ApplicationPages.HomePageRenderStrategy
Enumerated type for different ways of handling the rendering/ redirecting of the homepage. |
| Field Summary | |
static ApplicationPages.HomePageRenderStrategy |
BOOKMARK_REDIRECT
Use this homepage strategy if you want to redirect the homepage to a bookmarkable url like: bookmarkablePage=mybookmarkablepage This is the same as calling: setResponsePage(MyPage.class);. |
static ApplicationPages.HomePageRenderStrategy |
NO_REDIRECT
Use this homepage strategy if you don't want to redirect so the url just stays '/' . |
static ApplicationPages.HomePageRenderStrategy |
PAGE_REDIRECT
Use this homepage strategy if you want to redirect the homepage just as a normal page would be in wicket (when you submit a form on the page or when you do in the code: setResponsePage(new MyPage()); If you have set the overall Redirect Strategy to ONE_PASS_RENDER then the homepage response will honor that. |
| Constructor Summary | |
ApplicationPages()
|
|
| Method Summary | |
java.lang.String |
aliasForClass(java.lang.Class pageClass)
Returns the alias for the given page class or null if no alias was found. |
java.lang.Class |
classForAlias(java.lang.String alias)
Returns the page class for the given alias or null if the alias is not mapped. |
java.lang.Class |
getHomePage()
Gets home page class. |
ApplicationPages.HomePageRenderStrategy |
getHomePageRenderStrategy()
Gets home page redirect strategy. |
java.lang.Class |
getInternalErrorPage()
Gets internal error page class. |
java.lang.Class |
getPageExpiredErrorPage()
Gets the page expired page class. |
void |
putClassAlias(java.lang.Class pageClass,
java.lang.String alias)
Use this method to add logical names to your bookmarkable pages. |
ApplicationPages |
setHomePage(java.lang.Class homePage)
Sets home page class. |
ApplicationPages |
setHomePageRenderStrategy(ApplicationPages.HomePageRenderStrategy homePageStrategy)
Sets home page strategy. |
ApplicationPages |
setInternalErrorPage(java.lang.Class internalErrorPage)
Sets internal error page class. |
ApplicationPages |
setPageExpiredErrorPage(java.lang.Class pageExpiredErrorPage)
Sets the page expired page class. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final ApplicationPages.HomePageRenderStrategy NO_REDIRECT
public static final ApplicationPages.HomePageRenderStrategy BOOKMARK_REDIRECT
public static final ApplicationPages.HomePageRenderStrategy PAGE_REDIRECT
| Constructor Detail |
public ApplicationPages()
| Method Detail |
public final java.lang.Class getHomePage()
setHomePage(Class)public final ApplicationPages.HomePageRenderStrategy getHomePageRenderStrategy()
ApplicationPages#setHomePageRenderStrategy(HomePageRenderStrategy)public final java.lang.Class getInternalErrorPage()
setInternalErrorPage(Class)public final java.lang.Class getPageExpiredErrorPage()
setPageExpiredErrorPage(Class)public final ApplicationPages setHomePage(java.lang.Class homePage)
homePage - The home page class
public final ApplicationPages setHomePageRenderStrategy(ApplicationPages.HomePageRenderStrategy homePageStrategy)
homePageStrategy - The homepage redirect strategy that has to be used
public final ApplicationPages setInternalErrorPage(java.lang.Class internalErrorPage)
internalErrorPage - The internalErrorPage to set.
public final ApplicationPages setPageExpiredErrorPage(java.lang.Class pageExpiredErrorPage)
pageExpiredErrorPage - The pageExpiredErrorPage to set.
public final java.lang.String aliasForClass(java.lang.Class pageClass)
pageClass - The class to get the alias for
public final java.lang.Class classForAlias(java.lang.String alias)
alias - the alias to look up
public final void putClassAlias(java.lang.Class pageClass,
java.lang.String alias)
pageClass - class of the page to mapalias - the alias or logical name of the bookmarkable page
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||