|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.BaseComponent
org.apache.tapestry.AbstractPage
public abstract class AbstractPage
Abstract base class implementing the IPage
interface.
Constructor Summary | |
---|---|
AbstractPage()
Standard constructor; invokes initialize() to configure initial values for
properties of the page. |
Method Summary | |
---|---|
void |
addPageAttachListener(PageAttachListener listener)
|
void |
addPageBeginRenderListener(PageBeginRenderListener listener)
|
void |
addPageDetachListener(PageDetachListener listener)
|
void |
addPageEndRenderListener(PageEndRenderListener listener)
|
void |
addPageRenderListener(PageRenderListener listener)
Deprecated. |
void |
addPageValidateListener(PageValidateListener listener)
|
void |
attach(IEngine engine,
IRequestCycle cycle)
Called by the engine to attach the page to itself. |
void |
beginPageRender()
Invoked before a partial render of the page occurs (this happens when rewinding a Form within the page). |
void |
beginResponse(IMarkupWriter writer,
IRequestCycle cycle)
Deprecated. To be removed in 4.0. Implement PageRenderListener instead. |
void |
detach()
Prepares the page to be returned to the pool. |
void |
endPageRender()
Invoked after a partial render of the page occurs (this happens when rewinding a Form within the page). |
void |
firePageAttached()
Used to explicitly fire PageAttachListener s for this page. |
protected void |
firePageBeginRender()
|
protected void |
firePageDetached()
|
protected void |
firePageEndRender()
|
protected void |
firePageValidate()
|
ChangeObserver |
getChangeObserver()
Returns the object (effectively, an IPageRecorder ) that
is notified of any changes to persistant properties of the page. |
IEngine |
getEngine()
Returns the IEngine that the page is currently attached to. |
java.lang.String |
getExtendedId()
Returns the name of the page. |
java.lang.Object |
getGlobal()
Deprecated. |
java.lang.String |
getIdPath()
Pages always return null for idPath. |
java.util.Locale |
getLocale()
Returns the locale for the page, which may be null if the locale is not known (null corresponds to the "default locale"). |
IComponent |
getNestedComponent(java.lang.String path)
Returns a particular component from within the page. |
protected java.lang.String |
getOutputEncoding()
Returns the output encoding to be used when rendering this page. |
java.lang.String |
getPageName()
Returns the fully qualified name of the page, including its namespace prefix, if any. |
IRequestCycle |
getRequestCycle()
Returns the current IRequestCycle . |
java.lang.Object |
getVisit()
Deprecated. |
protected void |
initialize()
Deprecated. To be removed in 4.1 with no replacement. |
void |
removePageAttachListener(PageAttachListener listener)
|
void |
removePageBeginRenderListener(PageBeginRenderListener listener)
|
void |
removePageDetachListener(PageDetachListener listener)
|
void |
removePageEndRenderListener(PageEndRenderListener listener)
|
void |
removePageRenderListener(PageRenderListener listener)
Deprecated. |
void |
removePageValidateListener(PageValidateListener listener)
|
void |
renderPage(IMarkupWriter writer,
IRequestCycle cycle)
Invokes PageBeginRenderListener.pageBeginRender(PageEvent)
Invokes beginResponse(IMarkupWriter, IRequestCycle)
Invokes IRequestCycle.commitPageChanges() (if not rewinding)
Invokes AbstractComponent.render(IMarkupWriter, IRequestCycle)
Invokes PageEndRenderListener.pageEndRender(PageEvent) (this occurs even if a
previous step throws an exception) |
void |
setChangeObserver(ChangeObserver value)
|
void |
setLocale(java.util.Locale value)
Updates the page's locale. |
void |
setPageName(java.lang.String pageName)
Sets the name of the page. |
void |
validate(IRequestCycle cycle)
By default, pages are not protected and this method does nothing. |
Methods inherited from class org.apache.tapestry.BaseComponent |
---|
addOuter, finishLoad, renderComponent |
Methods inherited from class org.apache.tapestry.AbstractComponent |
---|
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
---|
getLocation, setLocation |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.tapestry.IPage |
---|
getResponseContentType |
Methods inherited from interface org.apache.tapestry.IComponent |
---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getId, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty |
Methods inherited from interface org.apache.tapestry.IRender |
---|
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
---|
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
---|
getLocation |
Constructor Detail |
---|
public AbstractPage()
initialize()
to configure initial values for
properties of the page.
Method Detail |
---|
public void detach()
PageDetachListener.pageDetached(PageEvent)
on all listeners
initialize()
to clear/reset any properties
Subclasses may override this method, but must invoke this implementation (usually, last).
detach
in interface IPage
PageDetachListener
protected void initialize()
detach()
to (re-)initialize properties
of the page. This is most useful when properties have non-null initial values.
Subclasses may override this implementation (which is empty).
PageDetachListener
,
PageAttachListener
public IEngine getEngine()
IPage
IEngine
that the page is currently attached to.
getEngine
in interface IPage
public ChangeObserver getChangeObserver()
IPage
IPageRecorder
) that
is notified of any changes to persistant properties of the page.
getChangeObserver
in interface IPage
public java.lang.String getExtendedId()
getExtendedId
in interface IComponent
getExtendedId
in class AbstractComponent
AbstractComponent.getIdPath()
public java.lang.String getIdPath()
getIdPath
in interface IComponent
getIdPath
in class AbstractComponent
IComponent.getId()
public java.util.Locale getLocale()
getLocale
in interface IPage
public void setLocale(java.util.Locale value)
IPage
ApplicationRuntimeException
.
setLocale
in interface IPage
public IComponent getNestedComponent(java.lang.String path)
IPage
getNestedComponent
in interface IPage
public void attach(IEngine engine, IRequestCycle cycle)
engine
to attach the page to itself. Does not change
the locale, but since a page is selected from the
IPageSource
pool based on its locale matching the engine's
locale, they should match anyway.
attach
in interface IPage
public void renderPage(IMarkupWriter writer, IRequestCycle cycle)
PageBeginRenderListener.pageBeginRender(PageEvent)
beginResponse(IMarkupWriter, IRequestCycle)
IRequestCycle.commitPageChanges()
(if not rewinding)
AbstractComponent.render(IMarkupWriter, IRequestCycle)
PageEndRenderListener.pageEndRender(PageEvent)
(this occurs even if a
previous step throws an exception)
renderPage
in interface IPage
public void setChangeObserver(ChangeObserver value)
setChangeObserver
in interface IPage
public void setPageName(java.lang.String pageName)
IPage
setPageName
in interface IPage
pageName
- fully qualified page name (including namespace prefix, if any)public void validate(IRequestCycle cycle)
validate
in interface IPage
public void beginResponse(IMarkupWriter writer, IRequestCycle cycle)
PageRenderListener
instead.
beginResponse
in interface IPage
public IRequestCycle getRequestCycle()
IPage
IRequestCycle
. This is set when the page is loaded (or obtained
from the pool) and attached to the engine
.
getRequestCycle
in interface IPage
public java.lang.Object getVisit()
IEngine.getVisit(IRequestCycle)
.
getVisit
in interface IPage
public java.lang.Object getGlobal()
IEngine.getGlobal()
.
getGlobal
in interface IPage
public void addPageDetachListener(PageDetachListener listener)
addPageDetachListener
in interface IPage
public void addPageRenderListener(PageRenderListener listener)
addPageRenderListener
in interface IPage
public void addPageBeginRenderListener(PageBeginRenderListener listener)
addPageBeginRenderListener
in interface IPage
public void addPageEndRenderListener(PageEndRenderListener listener)
addPageEndRenderListener
in interface IPage
public void removePageBeginRenderListener(PageBeginRenderListener listener)
removePageBeginRenderListener
in interface IPage
public void removePageEndRenderListener(PageEndRenderListener listener)
removePageEndRenderListener
in interface IPage
public void firePageAttached()
IPage
PageAttachListener
s for this page. This is used when a page
is first loaded; The page loader attaches the newly created page instance before
the rest of the page and components is loaded. In order to have meaningful event
notifications when a page is first loaded (rather than pulled from the pool), it is necessary
to fire page attach listeners at the end of the load.
firePageAttached
in interface IPage
protected void firePageDetached()
protected void firePageBeginRender()
protected void firePageEndRender()
public void removePageDetachListener(PageDetachListener listener)
removePageDetachListener
in interface IPage
public void removePageRenderListener(PageRenderListener listener)
removePageRenderListener
in interface IPage
public void beginPageRender()
IPage
Form
within the page). The page is expected to fire
appopriate events.
beginPageRender
in interface IPage
public void endPageRender()
IPage
Form
within the page). The page is expected to fire
appropriate events.
endPageRender
in interface IPage
public java.lang.String getPageName()
IPage
getPageName
in interface IPage
public void addPageValidateListener(PageValidateListener listener)
addPageValidateListener
in interface IPage
public void removePageValidateListener(PageValidateListener listener)
removePageValidateListener
in interface IPage
public void addPageAttachListener(PageAttachListener listener)
addPageAttachListener
in interface IPage
public void removePageAttachListener(PageAttachListener listener)
removePageAttachListener
in interface IPage
protected void firePageValidate()
protected java.lang.String getOutputEncoding()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |