|
||||||||||
| 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
public abstract class Page
Abstract base class for pages. As a MarkupContainer subclass, a Page can contain a component hierarchy and markup in some markup language such as HTML. Users of the framework should not attempt to subclass Page directly. Instead they should subclass a subclass of Page that is appropriate to the markup type they are using, such as WebPage (for HTML markup).
MarkupContainer.
IModel). A Page can be assigned a model by passing one to the Page's
constructor, by overriding initModel() or with an explicit invocation of
setModel(). If the model is a
CompoundPropertyModel, Components on the
Page can use the Page's model implicitly via container inheritance. If a
Component is not assigned a model, the initModel() override in Component will
cause that Component to use the nearest CompoundModel in the parent chain, in
this case, the Page's model. For basic CompoundModels, the name of the
Component determines which property of the implicit page model the component
is bound to. If more control is desired over the binding of Components to the
page model (for example, if you want to specify some property expression
other than the component's name for retrieving the model object),
BoundCompoundPropertyModel can be used.
IAuthorizationStrategy,
SimplePageAuthorizationStrategy
WebPage,
MarkupContainer,
CompoundPropertyModel,
BoundCompoundPropertyModel,
Component,
IPageVersionManager,
UndoPageVersionManager,
Serialized Form| Nested Class Summary | |
|---|---|
static interface |
Page.IPageSerializer
You can set implementation of the interface in the serializer then that implementation will handle the
serialization of this page. |
| Nested classes/interfaces inherited from class org.apache.wicket.Component |
|---|
Component.ComponentModelChange, Component.EnabledChange, Component.IVisitor, Component.VisibilityChange |
| Field Summary | |
|---|---|
static int |
LATEST_VERSION
When passed to getVersion(int) the latest page version is
returned. |
static java.lang.ThreadLocal |
serializer
This is a thread local that is used for serializing page references in this page.It stores a Page.IPageSerializer which can be set by the
outside world to do the serialization of this page. |
| Fields inherited from class org.apache.wicket.Component |
|---|
ENABLE, FLAG_RESERVED1, FLAG_RESERVED2, FLAG_RESERVED3, FLAG_RESERVED4, FLAG_RESERVED5, FLAG_RESERVED6, FLAG_RESERVED7, FLAG_RESERVED8, PATH_SEPARATOR, RENDER |
| Fields inherited from interface org.apache.wicket.IRedirectListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
protected |
Page()
Constructor. |
protected |
Page(IModel model)
Constructor. |
protected |
Page(IPageMap pageMap)
Constructor. |
protected |
Page(IPageMap pageMap,
IModel model)
Constructor. |
protected |
Page(PageParameters parameters)
Constructor. |
| Method Summary | |
|---|---|
void |
afterCallComponent(Component component,
RequestListenerInterface listener)
Called right after a component's listener method (the provided method argument) was called. |
void |
beforeCallComponent(Component component,
RequestListenerInterface listener)
Called just before a component's listener method (the provided method argument) is called. |
void |
componentRendered(Component component)
Adds a component to the set of rendered components. |
protected void |
configureResponse()
Set-up response with appropriate content type, locale and encoding. |
void |
detachModels()
Detaches any attached models referenced by this page. |
void |
dirty()
Mark this page as dirty in the session |
void |
endComponentRender(Component component)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
void |
expireOldestVersion()
Expire the oldest version of this page |
int |
getAjaxVersionNumber()
|
short |
getAutoIndex()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
int |
getCurrentVersionNumber()
|
java.lang.String |
getId()
Gets the id of this component. |
int |
getNumericId()
|
java.lang.Class |
getPageClass()
|
IPageMap |
getPageMap()
|
IPageMapEntry |
getPageMapEntry()
|
java.lang.String |
getPageMapName()
|
long |
getSizeInBytes()
|
boolean |
getStatelessHint()
Returns whether the page should try to be stateless. |
Page |
getVersion(int versionNumber)
Override this method to implement a custom way of producing a version of a Page when it cannot be found in the Session. |
int |
getVersions()
|
java.lang.String |
hierarchyAsString()
|
void |
ignoreVersionMerge()
Call this method when the current (ajax) request shouldn't merge the changes that are happening to the page with the previous version. |
protected void |
internalOnModelChanged()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
isBookmarkable()
Bookmarkable page can be instantiated using a bookmarkable URL. |
boolean |
isErrorPage()
Override this method and return true if your page is used to display Wicket errors. |
boolean |
isPageStateless()
Gets whether the page is stateless. |
protected void |
moveToPageMap(IPageMap map)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected IPageVersionManager |
newVersionManager()
|
protected void |
onDetach()
Called to allow a component to detach resources after use. |
void |
onRedirect()
Redirect to this page. |
protected void |
onRender(MarkupStream markupStream)
Renders this container to the given response object. |
void |
removePersistedFormData(java.lang.Class formClass,
boolean disablePersistence)
Convenience method. |
void |
renderPage()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
Page |
rollbackPage(int numberOfVersions)
This returns a page instance that is rollbacked the number of versions that is specified compared to the current page. |
void |
setNumericId(int id)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
void |
setStatelessHint(boolean value)
Sets whether the page should try to be stateless. |
void |
startComponentRender(Component component)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
java.lang.String |
toString()
Get the string representation of this container. |
| Methods inherited from class org.apache.wicket.MarkupContainer |
|---|
add, addOrReplace, autoAdd, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, getMarkupType, hasAssociatedMarkup, internalAdd, isTransparentResolver, iterator, iterator, newMarkupResourceStream, onComponentTagBody, remove, remove, removeAll, renderAll, renderAssociatedMarkup, renderComponentTagBody, replace, setMarkupStream, setModel, size, 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 |
| Field Detail |
|---|
public static final int LATEST_VERSION
getVersion(int) the latest page version is
returned.
public static final java.lang.ThreadLocal serializer
Page.IPageSerializer which can be set by the
outside world to do the serialization of this page.
| Constructor Detail |
|---|
protected Page()
protected Page(IModel model)
model - See ComponentComponent.Component(String, IModel)protected Page(IPageMap pageMap)
pageMap - The page map to put this page inprotected Page(IPageMap pageMap, IModel model)
pageMap - the name of the page map to put this page inmodel - See ComponentComponent.Component(String, IModel)protected Page(PageParameters parameters)
parameters - externally passed parametersPageParameters| Method Detail |
|---|
public void afterCallComponent(Component component, RequestListenerInterface listener)
beforeCallComponent(Component, RequestListenerInterface)
or the method invocation itself failed.
component - the component that is to be calledlistener - the listener of that component that is to be calledpublic void beforeCallComponent(Component component, RequestListenerInterface listener)
afterCallComponent(Component, RequestListenerInterface)
will always be called.
component - the component that is to be calledlistener - the listener of that component that is to be calledpublic final void componentRendered(Component component)
component - The component that was renderedpublic void detachModels()
detachModels in class Componentpublic final void dirty()
public final void endComponentRender(Component component)
component - public final void expireOldestVersion()
public final int getAjaxVersionNumber()
public final short getAutoIndex()
public final int getCurrentVersionNumber()
public final java.lang.String getId()
Component
Component.getId()public int getNumericId()
getNumericId in interface IPageMapEntryIPageMapEntry.getNumericId()public final java.lang.Class getPageClass()
getPageClass in interface IPageMapEntryIPageMapEntry.getPageClass()public final IPageMap getPageMap()
public IPageMapEntry getPageMapEntry()
public final java.lang.String getPageMapName()
public final long getSizeInBytes()
getSizeInBytes in class Componentpublic final boolean getStatelessHint()
getStatelessHint in class ComponentComponent.getStatelessHint()public Page getVersion(int versionNumber)
versionNumber - The version desired
public final int getVersions()
public final java.lang.String hierarchyAsString()
public final void ignoreVersionMerge()
public boolean isBookmarkable()
public boolean isErrorPage()
public final boolean isPageStateless()
public final void onRedirect()
onRedirect in interface IRedirectListenerIRedirectListener.onRedirect()
public final void removePersistedFormData(java.lang.Class formClass,
boolean disablePersistence)
formClass - Form to be selected. Pages may have more than one Form.disablePersistence - if true, disable persistence for all FormComponents on that
page. If false, it will remain unchanged.Form.removePersistentFormComponentValues(boolean)public final void renderPage()
public final Page rollbackPage(int numberOfVersions)
numberOfVersions - to rollback
public final void setNumericId(int id)
setNumericId in interface IPageMapEntryid - The idpublic final void setStatelessHint(boolean value)
value - whether the page should try to be statelesspublic final void startComponentRender(Component component)
component - public java.lang.String toString()
toString in class MarkupContainerComponent.toString()protected void configureResponse()
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 favour of the new, much safer, approach. Please see the Wiki for more details.
protected final void internalOnModelChanged()
internalOnModelChanged in class ComponentComponent.internalOnModelChanged()protected final void moveToPageMap(IPageMap map)
map - protected final IPageVersionManager newVersionManager()
protected void onDetach()
Component
Component.onDetach()protected void onRender(MarkupStream markupStream)
onRender in class MarkupContainermarkupStream -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||