public class ConversationalPersistentFieldStrategy extends Object implements org.apache.tapestry5.services.PersistentFieldStrategy
| Constructor and Description |
|---|
ConversationalPersistentFieldStrategy(org.apache.tapestry5.services.Request request,
ConversationManager conversationManager) |
| Modifier and Type | Method and Description |
|---|---|
protected Object |
convertApplicationValueToPersisted(Object newValue)
Hook that allows a value to be converted as it is written to the session.
|
protected Object |
convertPersistedToApplicationValue(Object persistedValue)
Converts a persisted value stored in the session back into an application value.
|
protected void |
didReadChange(org.apache.tapestry5.services.Session session,
String attributeName)
Called after each key is read by
gatherFieldChanges(String). |
void |
discardChanges(String pageName) |
Collection<org.apache.tapestry5.services.PersistentFieldChange> |
gatherFieldChanges(String pageName) |
static boolean |
isBlank(String input) |
void |
postChange(String pageName,
String componentId,
String fieldName,
Object newValue) |
public ConversationalPersistentFieldStrategy(org.apache.tapestry5.services.Request request,
ConversationManager conversationManager)
public final Collection<org.apache.tapestry5.services.PersistentFieldChange> gatherFieldChanges(String pageName)
gatherFieldChanges in interface org.apache.tapestry5.services.PersistentFieldStrategypublic void discardChanges(String pageName)
discardChanges in interface org.apache.tapestry5.services.PersistentFieldStrategyprotected void didReadChange(org.apache.tapestry5.services.Session session,
String attributeName)
gatherFieldChanges(String). This implementation does nothing, subclasses
may override.session - the session from which a value was just readattributeName - the name of the attribute used to read a valuepublic static boolean isBlank(String input)
public final void postChange(String pageName, String componentId, String fieldName, Object newValue)
postChange in interface org.apache.tapestry5.services.PersistentFieldStrategyprotected Object convertApplicationValueToPersisted(Object newValue)
newValue - non-null valueconvertPersistedToApplicationValue(Object)protected Object convertPersistedToApplicationValue(Object persistedValue)
persistedValue - non-null persisted valueconvertPersistedToApplicationValue(Object)Copyright © 2004–2016. All rights reserved.