Class ClientPersistentFieldStrategy
- java.lang.Object
- 
- org.apache.tapestry5.internal.services.ClientPersistentFieldStrategy
 
- 
- All Implemented Interfaces:
- LinkCreationListener2,- PersistentFieldStrategy
 
 public class ClientPersistentFieldStrategy extends java.lang.Object implements PersistentFieldStrategy, LinkCreationListener2 Implements simple client-persistent properties. Most of the logic is delegated to an instance ofClientPersistentFieldStorage. This division of layer allows this service to be a true singleton, and a listener to theLinkSource, and allow per-request state to be isolated inside the other service.
- 
- 
Constructor SummaryConstructors Constructor Description ClientPersistentFieldStrategy(ClientPersistentFieldStorage storage)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreatedComponentEventLink(Link link, ComponentEventRequestParameters parameters)Invoked when an action link (a link that asks a component to perform an action) is created.voidcreatedPageRenderLink(Link link, PageRenderRequestParameters parameters)Invoked when a page link (a link that renders a page) is created.voiddiscardChanges(java.lang.String pageName)Discards any saved changes for the name page.java.util.Collection<PersistentFieldChange>gatherFieldChanges(java.lang.String pageName)Finds all persistent changes previously stored for the named page (for the current active session or client).voidpostChange(java.lang.String pageName, java.lang.String componentId, java.lang.String fieldName, java.lang.Object newValue)Posts a change of a persistent property.
 
- 
- 
- 
Constructor Detail- 
ClientPersistentFieldStrategypublic ClientPersistentFieldStrategy(ClientPersistentFieldStorage storage) 
 
- 
 - 
Method Detail- 
gatherFieldChangespublic java.util.Collection<PersistentFieldChange> gatherFieldChanges(java.lang.String pageName) Description copied from interface:PersistentFieldStrategyFinds all persistent changes previously stored for the named page (for the current active session or client).- Specified by:
- gatherFieldChangesin interface- PersistentFieldStrategy
 
 - 
postChangepublic void postChange(java.lang.String pageName, java.lang.String componentId, java.lang.String fieldName, java.lang.Object newValue) Description copied from interface:PersistentFieldStrategyPosts a change of a persistent property.- Specified by:
- postChangein interface- PersistentFieldStrategy
- 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
 
 - 
createdComponentEventLinkpublic void createdComponentEventLink(Link link, ComponentEventRequestParameters parameters) Description copied from interface:LinkCreationListener2Invoked when an action link (a link that asks a component to perform an action) is created. The listener may decide to encode additional query parameters into the link (viaLink.addParameter(String, String)).- Specified by:
- createdComponentEventLinkin interface- LinkCreationListener2
- Parameters:
- link- the newly created link
- parameters- information encoded into the link
 
 - 
createdPageRenderLinkpublic void createdPageRenderLink(Link link, PageRenderRequestParameters parameters) Description copied from interface:LinkCreationListener2Invoked when a page link (a link that renders a page) is created. The listener may decide to encode additional query parameters into the link (viaLink.addParameter(String, String)).- Specified by:
- createdPageRenderLinkin interface- LinkCreationListener2
- Parameters:
- link- the newly created link
- parameters- information encoded into the link
 
 - 
discardChangespublic void discardChanges(java.lang.String pageName) Description copied from interface:PersistentFieldStrategyDiscards any saved changes for the name page. There is no expectation that data already gathered from the strategy and presumably 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.- Specified by:
- discardChangesin interface- PersistentFieldStrategy
- Parameters:
- pageName- logical name of page whose field persistent data should be discarded
 
 
- 
 
-