|
||||||||||
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.
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 Form within 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 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. |
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 IPage
PageDetachListener
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 String getExtendedId()
getExtendedId
in interface IComponent
getExtendedId
in class AbstractComponent
AbstractComponent.getIdPath()
public String getIdPath()
getIdPath
in interface IComponent
getIdPath
in class AbstractComponent
IComponent.getId()
public Locale getLocale()
getLocale
in interface IPage
public void setLocale(Locale value)
IPage
ApplicationRuntimeException
.
setLocale
in interface IPage
public 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 IPage
public void setChangeObserver(ChangeObserver value)
setChangeObserver
in interface IPage
public void setPageName(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 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 void addPageDetachListener(PageDetachListener listener)
addPageDetachListener
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 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
protected void cleanupAfterRender(IRequestCycle cycle)
AbstractComponent
AbstractComponent.render(IMarkupWriter, IRequestCycle)
after the component renders.
cleanupAfterRender
in class AbstractComponent
public 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 String getOutputEncoding()
public boolean hasFormComponents()
IPage
IForm
instances.
hasFormComponents
in interface IPage
public void setHasFormComponents(boolean value)
IPage
setHasFormComponents
in interface IPage
value
- Indicator of containing forms.public boolean hasWidgets()
IPage
IWidget
instances.
hasWidgets
in interface IPage
public void setHasWidgets(boolean value)
IPage
setHasWidgets
in interface IPage
value
- Indicator of containing widgets.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |