|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.tapestry.record.PageRecorder
org.apache.tapestry.record.SessionPageRecorder
public class SessionPageRecorder
Simple implementation of IPageRecorderthat stores page
changes as HttpSessionattributes.
| 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()
IPageRecorderIEngine.forgetPage(String) or
IPageRecorder.markForDiscard().
public void commit()
commit in interface IPageRecordercommit in class PageRecorderpublic boolean getHasChanges()
public Collection getChanges()
PageRecorderCollection of
IPageChange objects
identifying changes to the page and its components.
getChanges in interface IPageRecordergetChanges in class PageRecorder
protected void recordChange(String componentPath,
String propertyName,
Object newValue)
PageRecorderThis method is responsible for setting the dirty flag if the described change is real.
recordChange in class PageRecordercomponentPath - 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 | ||||||||