org.apache.tapestry5.services
Interface PersistentFieldStrategy

All Known Subinterfaces:
ClientPersistentFieldStorage
All Known Implementing Classes:
AbstractSessionPersistentFieldStrategy, ClientPersistentFieldStorageImpl, ClientPersistentFieldStrategy, EntityPersistentFieldStrategy, EntityPersistentFieldStrategy, FlashPersistentFieldStrategy, SessionPersistentFieldStrategy

public interface PersistentFieldStrategy

Defines how changes to fields (within components, within pages) may have their values persisted between requests. Different implementations store the field values in the session, on the client, or elsewhere.


Method Summary
 void discardChanges(String pageName)
          Discards any saved changes for the name page.
 Collection<PersistentFieldChange> gatherFieldChanges(String pageName)
          Finds all persistent changes previously stored for the named page (for the current active session or client).
 void postChange(String pageName, String componentId, String fieldName, Object newValue)
          Posts a change of a persistent property.
 

Method Detail

postChange

void postChange(String pageName,
                String componentId,
                String fieldName,
                Object newValue)
Posts a change of a persistent property.

Parameters:
pageName - the name of the page containing the component
componentId - the nested id path of the component (or null for the page's root component)
fieldName - the name of the field whose persistent value has changed
newValue - the new value for the field, possibly null

gatherFieldChanges

Collection<PersistentFieldChange> gatherFieldChanges(String pageName)
Finds all persistent changes previously stored for the named page (for the current active session or client).


discardChanges

void discardChanges(String pageName)
Discards any saved changes for the name page. There is no expectation that data already gathered from the strategy and persumably dumped into component instance fields will be affected, but future field access (within this request or a later one) will show no data for the indicated page.

Parameters:
pageName - logical name of page whose field persistent data should be discarded


Copyright © 2003-2012 The Apache Software Foundation.