|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tapestry.record.PageRecorder org.apache.tapestry.record.SessionPageRecorder
public class SessionPageRecorder
Simple implementation of IPageRecorder
that stores page
changes as HttpSession
attributes.
Constructor Summary | |
---|---|
SessionPageRecorder()
|
Method Summary | |
---|---|
void |
commit()
Simply clears the dirty flag, because there is no external place to store changed page properties. |
void |
discard()
Invoked at the end of a request cycle in which the page recorder is discarded (either implicitly, because the page recorder has no changes, or explicitly because of IEngine.forgetPage(String) or
IPageRecorder.markForDiscard() . |
Collection |
getChanges()
Returns a Collection of
IPageChange objects
identifying changes to the page and its components. |
boolean |
getHasChanges()
Returns true if the recorder has any changes recorded. |
void |
initialize(String pageName,
IRequestCycle cycle)
Invoked after the recorder is instantiated to initialize it for the current request cycle. |
protected void |
recordChange(String componentPath,
String propertyName,
Object newValue)
Records a change to a particular component. |
Methods inherited from class org.apache.tapestry.record.PageRecorder |
---|
getDirty, isDirty, isLocked, isMarkedForDiscard, markForDiscard, observeChange, rollback, setDirty, setLocked |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SessionPageRecorder()
Method Detail |
---|
public void initialize(String pageName, IRequestCycle cycle)
IPageRecorder
pageName
- the fully qualified page namecycle
- the current request cyclepublic void discard()
IPageRecorder
IEngine.forgetPage(String)
or
IPageRecorder.markForDiscard()
.
public void commit()
commit
in interface IPageRecorder
commit
in class PageRecorder
public boolean getHasChanges()
public Collection getChanges()
PageRecorder
Collection
of
IPageChange
objects
identifying changes to the page and its components.
getChanges
in interface IPageRecorder
getChanges
in class PageRecorder
protected void recordChange(String componentPath, String propertyName, Object newValue)
PageRecorder
This method is responsible for setting the dirty flag if the described change is real.
recordChange
in class PageRecorder
componentPath
- the name of the component relative to the
page which contains it. May be null if the change was to a
property of the page itself.propertyName
- the name of the property which changed.newValue
- the new value for the property, which may also
be null.IComponent.getIdPath()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |