|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.tapestry5.internal.structure.PageImpl
public class PageImpl
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.tapestry5.internal.structure.Page |
|---|
Page.Stats |
| Constructor Summary | |
|---|---|
PageImpl(String name,
ComponentResourceSelector selector,
PersistentFieldManager persistentFieldManager,
PerthreadManager perThreadManager)
|
|
| Method Summary | |
|---|---|
void |
addLifecycleListener(PageLifecycleListener listener)
Adds a listener that is notified of large scale page events. |
void |
addResetListener(PageResetListener listener)
Adds a new listener for page reset events. |
void |
addVerifyListener(Runnable callback)
Adds a verify callback, which is allowed while the page is loading. |
void |
attached()
Invoked to inform the page that it is attached to the current request. |
boolean |
detached()
Invoked to inform the page that it is being detached from the current request. |
void |
discardPersistentFieldChanges()
Discards all persistent field changes for the page containing the component. |
int |
getAttachCount()
Returns the number of times the page has been attached to a request. |
ComponentPageElement |
getComponentElementByNestedId(String nestedId)
Retrieves a component element by its nested id (a sequence of simple ids, separated by dots). |
Object |
getFieldChange(String nestedId,
String fieldName)
Gets a change for a field within the component. |
org.slf4j.Logger |
getLogger()
Returns the logger of the root component element. |
String |
getName()
Returns the short, logical name for the page. |
Component |
getRootComponent()
The root component of the page. |
ComponentPageElement |
getRootElement()
The root component of the page. |
ComponentResourceSelector |
getSelector()
The selector (which includes Locale) used when the page was constructor. |
Page.Stats |
getStats()
Returns the page construction statistics for this page. |
boolean |
hasResetListeners()
Returns true if there are any PageResetListener listeners. |
void |
loaded()
Inform the page that it is now completely loaded. |
void |
pageReset()
Invoked to notify PageResetListener listeners. |
void |
persistFieldChange(ComponentResources resources,
String fieldName,
Object newValue)
Posts a change to a persistent field. |
void |
removeLifecycleListener(PageLifecycleListener listener)
Removes a listener that was previously added. |
void |
setRootElement(ComponentPageElement component)
Invoked during page construction time to connect the page's root component to the page instance. |
void |
setStats(Page.Stats stats)
Invoked once at the end of page construction, to provide page construction statistics. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PageImpl(String name,
ComponentResourceSelector selector,
PersistentFieldManager persistentFieldManager,
PerthreadManager perThreadManager)
name - canonicalized page nameselector - used to locate resourcespersistentFieldManager - for access to cross-request persistent valuesperThreadManager - for managing per-request mutable state| Method Detail |
|---|
public void setStats(Page.Stats stats)
Page
setStats in interface Pagepublic Page.Stats getStats()
Page
getStats in interface Pagepublic String toString()
toString in class Objectpublic ComponentPageElement getComponentElementByNestedId(String nestedId)
Page
getComponentElementByNestedId in interface Pagepublic ComponentResourceSelector getSelector()
Page
getSelector in interface Pagepublic void setRootElement(ComponentPageElement component)
Page
setRootElement in interface Pagepublic ComponentPageElement getRootElement()
Page
getRootElement in interface Pagepublic Component getRootComponent()
Page
getRootComponent in interface Pagepublic void addLifecycleListener(PageLifecycleListener listener)
Page
addLifecycleListener in interface Pagepublic void removeLifecycleListener(PageLifecycleListener listener)
Page
removeLifecycleListener in interface Pagepublic boolean detached()
PagePerthreadManager. A future release of Tapestry will likely convert this method to
type void.
detached in interface PagePageLifecycleListener.containingPageDidDetach()public void loaded()
Page
loaded in interface PagePageLifecycleListener.containingPageDidLoad()public void attached()
PagePage.loaded() will preceded the call to Page.attached().
First all listeners have PageLifecycleListener.restoreStateBeforePageAttach() invoked, followed by
PageLifecycleListener.containingPageDidAttach().
attached in interface Pagepublic org.slf4j.Logger getLogger()
Page
getLogger in interface Page
public void persistFieldChange(ComponentResources resources,
String fieldName,
Object newValue)
Page
persistFieldChange in interface Pageresources - the component resources for the component or mixin containing the field whose
value changedfieldName - the name of the fieldnewValue - the new value for the field
public Object getFieldChange(String nestedId,
String fieldName)
Page
getFieldChange in interface PagenestedId - the nested component id of the component containing the fieldfieldName - the name of the persistent field
public void discardPersistentFieldChanges()
PageSession) which will
take effect in the next request (the attached page instance is not affected).
discardPersistentFieldChanges in interface Pagepublic String getName()
Page
getName in interface Pagepublic void addResetListener(PageResetListener listener)
Page
addResetListener in interface Pagelistener - will receive notifications when the page is accessed from a different pagepublic void addVerifyListener(Runnable callback)
Page
addVerifyListener in interface Pagecallback - to be invoked after page loadedpublic void pageReset()
PagePageResetListener listeners.
pageReset in interface Pagepublic boolean hasResetListeners()
PagePageResetListener listeners.
hasResetListeners in interface Pagepublic int getAttachCount()
Page
getAttachCount in interface Page
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||