org.apache.tapestry.engine
Interface IPageRecorder

All Superinterfaces:
ChangeObserver
All Known Implementing Classes:
PageRecorderImpl

public interface IPageRecorder
extends ChangeObserver

Defines an object that can observe changes to properties of a page and its components, store the state of the page between request cycles, and restore a page's state on a subsequent request cycle.

Concrete implementations of this can store the changes in memory, as client-side cookies, in a flat file, or in a database.

Author:
Howard Lewis Ship

Method Summary
 void commit()
          Persists all changes that have been accumulated.
 void rollback(IPage page)
          Rolls back the page to the currently persisted state.
 
Methods inherited from interface org.apache.tapestry.event.ChangeObserver
isLocked, observeChange
 

Method Detail

commit

void commit()
Persists all changes that have been accumulated. If the recorder saves change incrementally, this should ensure that all changes have been persisted.

After commiting, a page recorder automatically locks itself.


rollback

void rollback(IPage page)
Rolls back the page to the currently persisted state.

A page recorder can only rollback changes to properties which have changed at some point. This can cause some minor problems, addressed by PageDetachListener.pageDetached(org.apache.tapestry.event.PageEvent).



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.