|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.wicket.Component
org.apache.wicket.MarkupContainer
org.apache.wicket.Page
org.apache.wicket.markup.html.WebPage
public class WebPage
Base class for HTML pages. This subclass of Page simply returns HTML when asked for its markup type. It also has a method which subclasses can use to retrieve a bookmarkable link to the application's home page.
WebPages can be constructed with any constructor when they are being used in a Wicket session, but if you wish to link to a Page using a URL that is "bookmarkable" (which implies that the URL will not have any session information encoded in it, and that you can call this page directly without having a session first directly from your browser), you need to implement your Page with a no-arg constructor or with a constructor that accepts a PageParameters argument (which wraps any query string parameters for a request). In case the page has both constructors, the constructor with PageParameters will be used.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.wicket.Page |
---|
Page.IPageSerializer |
Nested classes/interfaces inherited from class org.apache.wicket.Component |
---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor<T extends Component>, Component.VisibilityChange |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Page |
---|
LATEST_VERSION, serializer |
Fields inherited from class org.apache.wicket.Component |
---|
ENABLE, FLAG_CONFIGURED, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER |
Fields inherited from interface org.apache.wicket.markup.html.INewBrowserWindowListener |
---|
INTERFACE |
Fields inherited from interface org.apache.wicket.IRedirectListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
protected |
WebPage()
Constructor. |
protected |
WebPage(IModel<?> model)
|
protected |
WebPage(IPageMap pageMap)
|
protected |
WebPage(IPageMap pageMap,
IModel<?> model)
|
protected |
WebPage(IPageMap pageMap,
PageParameters parameters)
Constructor which receives wrapped query string parameters for a request. |
protected |
WebPage(PageParameters parameters)
Constructor which receives wrapped query string parameters for a request. |
Method Summary | |
---|---|
protected void |
configureResponse()
Set-up response with appropriate content type, locale and encoding. |
String |
getMarkupType()
Gets the markup type for a WebPage, which is "html" by default. |
UrlCompressor |
getUrlCompressor()
This method is called when the compressing coding and response strategies are configured in your Application object like this: |
protected WebRequestCycle |
getWebRequestCycle()
|
protected BookmarkablePageLink<?> |
homePageLink(String id)
Creates and returns a bookmarkable link to this application's home page. |
protected void |
onAfterRender()
Called just after a component is rendered. |
void |
onNewBrowserWindow()
Called when a new browser window is detected. |
protected void |
setHeaders(WebResponse response)
Subclasses can override this to set there headers when the Page is being served. |
Methods inherited from class org.apache.wicket.MarkupContainer |
---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, get, getAssociatedMarkupStream, getMarkupStream, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onAfterRenderChildren, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, renderNext, replace, setDefaultModel, setMarkupStream, size, swap, toString, visitChildren, visitChildren |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.wicket.session.pagemap.IPageMapEntry |
---|
getPage |
Constructor Detail |
---|
protected WebPage()
protected WebPage(IModel<?> model)
Page.Page(IModel)
protected WebPage(IPageMap pageMap)
Page.Page(org.apache.wicket.IPageMap)
protected WebPage(IPageMap pageMap, IModel<?> model)
Page.Page(org.apache.wicket.IPageMap, org.apache.wicket.model.IModel)
protected WebPage(PageParameters parameters)
Page.getPageParameters()
. So that they are reused for stateless links.
parameters
- Wrapped query string parameters.protected WebPage(IPageMap pageMap, PageParameters parameters)
Page.getPageParameters()
. So that they are reused for stateless links.
pageMap
- The pagemap where the webpage needs to be constructed in.parameters
- Wrapped query string parameters.Method Detail |
---|
public String getMarkupType()
getMarkupType
in class Page
public final UrlCompressor getUrlCompressor()
protected IRequestCycleProcessor newRequestCycleProcessor() { return new UrlCompressingWebRequestProcessor(); }
UrlCompressingWebRequestProcessor
,
UrlCompressor
public void onNewBrowserWindow()
INewBrowserWindowListener
onNewBrowserWindow
in interface INewBrowserWindowListener
INewBrowserWindowListener.onNewBrowserWindow()
protected void configureResponse()
Page
Note: Prior to Wicket 1.1 the output encoding was determined by the page's markup encoding. Because this caused uncertainties about the /request/ encoding, it has been changed in favor of the new, much safer, approach. Please see the Wiki for more details.
configureResponse
in class Page
Page.configureResponse()
protected void setHeaders(WebResponse response)
response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache, max-age=0, must-revalidate");So if a Page wants to control this or doesn't want to set this info it should override this method and don't call super.
response
- The WebResponse where set(Date)Header can be called on.protected final WebRequestCycle getWebRequestCycle()
protected final BookmarkablePageLink<?> homePageLink(String id)
id
- Name of link
protected void onAfterRender()
Component
onAfterRender
in class Component
Component.onAfterRender()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |