|
||||||||||
| 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 IPageinterface.
| Field Summary |
|---|
| Fields inherited from class org.apache.tapestry.AbstractComponent |
|---|
_body, _bodyCount |
| Constructor Summary | |
|---|---|
AbstractPage()
Standard constructor. |
|
| Method Summary | |
|---|---|
void |
addPageAttachListener(PageAttachListener listener)
|
void |
addPageBeginRenderListener(PageBeginRenderListener listener)
|
void |
addPageDetachListener(PageDetachListener listener)
|
void |
addPageEndRenderListener(PageEndRenderListener listener)
|
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 Formwithin the page). |
protected void |
cleanupAfterRender(IRequestCycle cycle)
Invoked by AbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders. |
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 Formwithin the page). |
void |
firePageAttached()
Used to explicitly fire PageAttachListeners 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 IEnginethat the page is currently attached to. |
String |
getExtendedId()
Returns the name of the page. |
String |
getIdPath()
Pages always return null for idPath. |
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(String path)
Returns a particular component from within the page. |
protected String |
getOutputEncoding()
Returns the output encoding to be used when rendering this page. |
String |
getPageName()
Returns the fully qualified name of the page, including its namespace prefix, if any. |
IRequestCycle |
getRequestCycle()
Returns the current IRequestCycle. |
boolean |
hasFormComponents()
Whether or not this page contains IForm instances. |
boolean |
hasWidgets()
Whether or not this page contains IWidget instances. |
void |
removePageAttachListener(PageAttachListener listener)
|
void |
removePageBeginRenderListener(PageBeginRenderListener listener)
|
void |
removePageDetachListener(PageDetachListener listener)
|
void |
removePageEndRenderListener(PageEndRenderListener listener)
|
void |
removePageValidateListener(PageValidateListener listener)
|
void |
renderPage(ResponseBuilder builder,
IRequestCycle cycle)
Renders the page. |
void |
setChangeObserver(ChangeObserver value)
|
void |
setHasFormComponents(boolean value)
Sets whether or not page has forms. |
void |
setHasWidgets(boolean value)
Sets whether or not page has widgets. |
void |
setLocale(Locale value)
Updates the page's locale. |
void |
setPageName(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, getContainedRenderers, getInnerRenderers, renderComponent |
| Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
|---|
getLocation, setLocation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.tapestry.IPage |
|---|
getPropertyChangeObserver, getResponseContentType |
| Methods inherited from interface org.apache.tapestry.IComponent |
|---|
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getClientId, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getId, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, peekClientId, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
| 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()
| Method Detail |
|---|
public void detach()
PageDetachListener.pageDetached(PageEvent)on all listeners
Subclasses may override this method, but must invoke this implementation (usually, last).
detach in interface IPagePageDetachListenerpublic IEngine getEngine()
IPageIEnginethat the page is currently attached to.
getEngine in interface IPagepublic ChangeObserver getChangeObserver()
IPageIPageRecorder) that
is notified of any changes to persistant properties of the page.
getChangeObserver in interface IPagepublic String getExtendedId()
getExtendedId in interface IComponentgetExtendedId in class AbstractComponentAbstractComponent.getIdPath()public String getIdPath()
getIdPath in interface IComponentgetIdPath in class AbstractComponentIComponent.getId()public Locale getLocale()
getLocale in interface IPagepublic void setLocale(Locale value)
IPageApplicationRuntimeException.
setLocale in interface IPagepublic IComponent getNestedComponent(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(ResponseBuilder builder,
IRequestCycle cycle)
PageBeginRenderListener.pageBeginRender(PageEvent)
beginPageRender()
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 IPagepublic void setChangeObserver(ChangeObserver value)
setChangeObserver in interface IPagepublic void setPageName(String pageName)
IPage
setPageName in interface IPagepageName - fully qualified page name (including namespace prefix, if any)public void validate(IRequestCycle cycle)
validate in interface IPagepublic IRequestCycle getRequestCycle()
IPageIRequestCycle. This is set when the page is loaded (or obtained
from the pool) and attached to the engine.
getRequestCycle in interface IPagepublic void addPageDetachListener(PageDetachListener listener)
addPageDetachListener in interface IPagepublic void addPageBeginRenderListener(PageBeginRenderListener listener)
addPageBeginRenderListener in interface IPagepublic void addPageEndRenderListener(PageEndRenderListener listener)
addPageEndRenderListener in interface IPagepublic void removePageBeginRenderListener(PageBeginRenderListener listener)
removePageBeginRenderListener in interface IPagepublic void removePageEndRenderListener(PageEndRenderListener listener)
removePageEndRenderListener in interface IPagepublic void firePageAttached()
IPagePageAttachListeners 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 IPageprotected void firePageDetached()
protected void firePageBeginRender()
protected void firePageEndRender()
public void removePageDetachListener(PageDetachListener listener)
removePageDetachListener in interface IPagepublic void beginPageRender()
IPageFormwithin the page). The page is expected to fire
appopriate events.
beginPageRender in interface IPagepublic void endPageRender()
IPageFormwithin the page). The page is expected to fire
appropriate events.
endPageRender in interface IPageprotected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponentAbstractComponent.render(IMarkupWriter, IRequestCycle)after the component renders.
cleanupAfterRender in class AbstractComponentpublic String getPageName()
IPage
getPageName in interface IPagepublic void addPageValidateListener(PageValidateListener listener)
addPageValidateListener in interface IPagepublic void removePageValidateListener(PageValidateListener listener)
removePageValidateListener in interface IPagepublic void addPageAttachListener(PageAttachListener listener)
addPageAttachListener in interface IPagepublic void removePageAttachListener(PageAttachListener listener)
removePageAttachListener in interface IPageprotected void firePageValidate()
protected String getOutputEncoding()
public boolean hasFormComponents()
IPageIForm instances.
hasFormComponents in interface IPagepublic void setHasFormComponents(boolean value)
IPage
setHasFormComponents in interface IPagevalue - Indicator of containing forms.public boolean hasWidgets()
IPageIWidget instances.
hasWidgets in interface IPagepublic void setHasWidgets(boolean value)
IPage
setHasWidgets in interface IPagevalue - Indicator of containing widgets.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||