public class WebPage extends 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.
ENABLE, FLAG_INITIALIZED, FLAG_REMOVING_FROM_HIERARCHY, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED8, PARENT_PATH, PATH_SEPARATOR, RENDER, RFLAG_CONTAINER_DEQUEING| Modifier | Constructor and Description |
|---|---|
protected |
WebPage()
Constructor.
|
protected |
WebPage(IModel<?> model) |
protected |
WebPage(PageParameters parameters)
Constructor which receives wrapped query string parameters for a request.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureResponse(WebResponse response)
Set-up response with appropriate content type, locale and encoding.
|
void |
dirty(boolean isInitialization)
Prevents page from get dirty inside an AJAX request.
|
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 |
onRender()
Implementation that renders this component.
|
protected void |
renderXmlDecl()
The rules if and when to insert an xml decl in the response are a bit tricky.
|
protected void |
setHeaders(WebResponse response)
Subclasses can override this to set there headers when the Page is being served.
|
componentChanged, componentRendered, detachModels, dirty, endComponentRender, getAutoIndex, getId, getPageClass, getPageId, getPageParameters, getPageReference, getRenderCount, getSizeInBytes, getStatelessHint, hierarchyAsString, internalOnModelChanged, internalPrepareForRender, isBookmarkable, isErrorPage, isPageStateless, onBeforeRender, onDetach, onInitialize, renderPage, setFreezePageId, setNumericId, setStatelessHint, setWasCreatedBookmarkable, startComponentRender, toString, wasCreatedBookmarkable, wasRenderedadd, addDequeuedComponent, addOrReplace, autoAdd, canDequeueTag, contains, dequeue, dequeue, findComponentToDequeue, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, internalAdd, internalInitialize, iterator, iterator, newDequeueContext, onAfterRenderChildren, onComponentTagBody, queue, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildrenadd, addStateChange, afterRender, beforeRender, canCallListenerInterface, canCallListenerInterfaceAfterExpiry, checkComponentTag, checkComponentTagAttribute, checkHierarchyChange, clearOriginalDestination, configure, continueToOriginalDestination, debug, detach, detachModel, determineVisibility, error, exceptionMessage, fatal, findMarkupStream, findPage, findParent, findParentWithAssociatedMarkup, getAjaxRegionMarkupId, getApplication, getBehaviorById, getBehaviorId, getBehaviors, getBehaviors, getClassRelativePath, getConverter, getDefaultModel, getDefaultModelObject, getDefaultModelObjectAsString, getDefaultModelObjectAsString, getEscapeModelStrings, getFeedbackMessages, getFlag, getInnermostModel, getInnermostModel, getLocale, getLocalizer, getMarkup, getMarkupAttributes, getMarkupId, getMarkupId, getMarkupIdFromMarkup, getMarkupIdImpl, getMarkupSourcingStrategy, getMetaData, getModelComparator, getOutputMarkupId, getOutputMarkupPlaceholderTag, getPage, getPageRelativePath, getParent, getPath, getRenderBodyOnly, getRequest, getRequestCycle, getRequestFlag, getResponse, getSession, getString, getString, getString, getStyle, getVariation, hasBeenRendered, hasErrorMessage, hasFeedbackMessage, info, initModel, internalRenderComponent, internalRenderHead, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, renderHead, renderPlaceholderTag, replaceComponentTagBody, replaceWith, sameInnermostModel, sameInnermostModel, send, setAuto, setDefaultModelObject, setEnabled, setEscapeModelStrings, setFlag, setIgnoreAttributeModifier, setMarkup, setMarkupId, setMarkupIdImpl, setMetaData, setOutputMarkupId, setOutputMarkupPlaceholderTag, setParent, setRenderBodyOnly, setRequestFlag, setResponsePage, setResponsePage, setResponsePage, setVersioned, setVisibilityAllowed, setVisible, success, urlFor, urlFor, urlFor, urlFor, urlFor, visitParents, visitParents, warn, wrapclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcanCallListenerInterfaceAfterExpiry, detach, get, getBehaviorById, getBehaviorId, getPage, getPageRelativePathdetachdequeue, newDequeueContextprotected 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.public MarkupType getMarkupType()
getMarkupType in class PageMarkupContainer.getMarkupType()protected void onRender()
ComponentonRender in class PageMarkupContainer.onRender()protected void renderXmlDecl()
protected void configureResponse(WebResponse response)
response - The WebResponse objectprotected 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()
ComponentonAfterRender in class PageComponent.onAfterRender()protected final BookmarkablePageLink<Void> homePageLink(String id)
id - Name of linkCopyright © 2006–2014 Apache Software Foundation. All rights reserved.