org.apache.wicket.markup.html
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
INTERFACE
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 |
reportMissingHead(CharSequence collectedHeaderOutput)
Reports an error that there is no <head> and/or <body> in the page and
there is no where to write the header response.
|
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, onRedirect, renderPage, setFreezePageId, setNumericId, setStatelessHint, setWasCreatedBookmarkable, startComponentRender, toString, wasCreatedBookmarkable, wasRendered
add, addOrReplace, autoAdd, contains, get, get, getAssociatedMarkup, getAssociatedMarkupStream, getMarkup, internalAdd, internalInitialize, iterator, iterator, onAfterRenderChildren, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderNext, replace, setDefaultModel, size, swap, toString, visitChildren, visitChildren, visitChildren, visitChildren
add, addStateChange, afterRender, beforeRender, canCallListenerInterface, 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, isActionAuthorized, isAuto, isBehaviorAccepted, isEnableAllowed, isEnabled, isEnabledInHierarchy, isIgnoreAttributeModifier, isRenderAllowed, isRendering, isStateless, isVersioned, isVisibilityAllowed, isVisible, isVisibleInHierarchy, markRendering, modelChanged, modelChanging, newMarkupSourcingStrategy, onComponentTag, onConfigure, onEvent, onModelChanged, onModelChanging, onReAdd, onRemove, prepareForRender, redirectToInterceptPage, remove, remove, render, renderComponentTag, rendered, renderHead, 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, wrap
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
detach, get, getBehaviorById, getBehaviorId, getPage, getPageRelativePath
detach
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.public MarkupType getMarkupType()
getMarkupType
in class Page
MarkupContainer.getMarkupType()
protected void onRender()
Component
onRender
in class Page
MarkupContainer.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()
Component
onAfterRender
in class Page
Component.onAfterRender()
protected void reportMissingHead(CharSequence collectedHeaderOutput)
collectedHeaderOutput
- The collected response that should have been written to the <head>validateHeaders()
protected final BookmarkablePageLink<Void> homePageLink(String id)
id
- Name of linkCopyright © 2006–2017 Apache Software Foundation. All rights reserved.