|
||||||||||
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 |
Field Summary |
---|
Fields inherited from class org.apache.wicket.Page |
---|
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_RESERVED8, PATH_SEPARATOR, RENDER |
Fields inherited from interface org.apache.wicket.IRedirectListener |
---|
INTERFACE |
Constructor Summary | |
---|---|
protected |
WebPage()
Constructor. |
protected |
WebPage(IModel<?> model)
|
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. |
MarkupType |
getMarkupType()
Gets the markup type for a WebPage, which is "html" by default. |
protected BookmarkablePageLink<Void> |
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. |
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, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, getMarkupStream, hasAssociatedMarkup, internalAdd, iterator, iterator, onComponentTagBody, onMarkupAttached, remove, remove, removeAll, renderAll, renderAssociatedMarkup, 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.request.component.IRequestableComponent |
---|
canCallListenerInterface, detach, get, getBehaviorById, getBehaviorId, getPage, getPageRelativePath |
Constructor Detail |
---|
protected WebPage()
protected WebPage(IModel<?> model)
Page.Page(IModel)
protected WebPage(PageParameters parameters)
Page.getPageParameters()
. So that they are reused for stateless links.
parameters
- Wrapped query string parameters.Method Detail |
---|
public MarkupType getMarkupType()
getMarkupType
in class Page
MarkupContainer.getMarkupType()
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("Date", "[now]"); response.setHeader("Expires", "[0]"); response.setHeader("Pragma", "no-cache"); response.setHeader("Cache-Control", "no-cache");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 void onAfterRender()
Component
onAfterRender
in class Page
Component.onAfterRender()
protected final BookmarkablePageLink<Void> homePageLink(String id)
id
- Name of link
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |