|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwicket.Component
wicket.MarkupContainer
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.
WebPage,
MarkupContainer,
CompoundPropertyModel,
BoundCompoundPropertyModel,
Component,
IPageVersionManager,
UndoPageVersionManager,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class 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. |
| Fields inherited from class 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 wicket.IRedirectListener |
|---|
INTERFACE |
| Constructor Summary | |
|---|---|
protected |
Page()
Constructor. |
protected |
Page(IModel model)
Constructor. |
protected |
Page(PageMap pageMap)
Constructor. |
protected |
Page(PageMap pageMap,
IModel model)
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. |
boolean |
checkAccess()
Deprecated. this method is to be removed in future version in favor of instances of IAuthorizationStrategy such as
AbstractPageAuthorizationStrategy.
It isn't called anymore and made final so that people see
what must be changed. |
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 |
short |
getAutoIndex()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
int |
getCurrentVersionNumber()
|
FeedbackMessages |
getFeedbackMessages()
|
java.lang.String |
getId()
Gets the id of this component. |
int |
getNumericId()
|
java.lang.Class |
getPageClass()
|
PageMap |
getPageMap()
|
IPageMapEntry |
getPageMapEntry()
|
long |
getSizeInBytes()
|
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 |
internalDetach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalOnDetach()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected void |
internalOnModelChanged()
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
boolean |
isErrorPage()
Override this method and return true if your page is used to display Wicket errors. |
protected void |
moveToPageMap(PageMap map)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
protected IPageVersionManager |
newVersionManager()
|
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. |
void |
setNumericId(int id)
THIS METHOD IS NOT PART OF THE WICKET PUBLIC API. |
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 wicket.MarkupContainer |
|---|
add, autoAdd, contains, findMarkupStream, get, getAssociatedMarkupStream, getMarkupStream, getMarkupType, internalAdd, internalAttach, 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 wicket.session.pagemap.IPageMapEntry |
|---|
getPage |
| Field Detail |
|---|
public static final int LATEST_VERSION
getVersion(int) the latest page version is
returned.
| Constructor Detail |
|---|
protected Page()
protected Page(IModel model)
model - See ComponentComponent.Component(String, IModel)protected Page(PageMap pageMap)
pageMap - The page map to put this page inprotected Page(PageMap pageMap, IModel model)
pageMap - the name of the page map to put this page inmodel - See ComponentComponent.Component(String, IModel)| 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 boolean checkAccess()
IAuthorizationStrategy such as
AbstractPageAuthorizationStrategy.
It isn't called anymore and made final so that people see
what must be changed.
public void internalDetach()
MarkupContainer
internalDetach in class MarkupContainerMarkupContainer.internalDetach()public void detachModels()
detachModels in class Componentpublic final void dirty()
public final void renderPage()
public final void endComponentRender(Component component)
component - public final void expireOldestVersion()
public final short getAutoIndex()
public final int getCurrentVersionNumber()
public final FeedbackMessages getFeedbackMessages()
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 PageMap getPageMap()
public IPageMapEntry getPageMapEntry()
public final long getSizeInBytes()
getSizeInBytes in class Componentpublic Page getVersion(int versionNumber)
versionNumber - The version desired
public final int getVersions()
public final java.lang.String hierarchyAsString()
public boolean isErrorPage()
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 setNumericId(int id)
setNumericId in interface IPageMapEntryid - The idpublic 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 internalOnDetach()
internalOnDetach in class ComponentComponent.internalOnDetach()protected final void internalOnModelChanged()
internalOnModelChanged in class ComponentComponent.internalOnModelChanged()protected IPageVersionManager newVersionManager()
protected void onRender(MarkupStream markupStream)
onRender in class MarkupContainermarkupStream - protected final void moveToPageMap(PageMap map)
map -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||