org.apache.tapestry.record
Class PageClientPropertyPersistenceScope

java.lang.Object
  extended by org.apache.tapestry.record.AbstractPrefixedClientPropertyPersistenceScope
      extended by org.apache.tapestry.record.PageClientPropertyPersistenceScope
All Implemented Interfaces:
ClientPropertyPersistenceScope

public class PageClientPropertyPersistenceScope
extends AbstractPrefixedClientPropertyPersistenceScope

Defines the 'page' scope for persisting client properties. Persist the properties only if the current page name is the same as that of the property.

Since:
4.0
Author:
Mindbridge
See Also:
ClientPropertyPersistenceScope

Constructor Summary
PageClientPropertyPersistenceScope()
           
 
Method Summary
 void setRequestCycle(IRequestCycle requestCycle)
           
 boolean shouldEncodeState(ServiceEncoding encoding, String pageName, PersistentPropertyData data)
          Returns true if the active page name matches the page for this property.
 
Methods inherited from class org.apache.tapestry.record.AbstractPrefixedClientPropertyPersistenceScope
constructParameterName, extractPageName, isParameterForScope
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PageClientPropertyPersistenceScope

public PageClientPropertyPersistenceScope()
Method Detail

shouldEncodeState

public boolean shouldEncodeState(ServiceEncoding encoding,
                                 String pageName,
                                 PersistentPropertyData data)
Returns true if the active page name matches the page for this property. This means that after a new page has been activated, the state is discarded.

Parameters:
encoding - identifies the service, URL and base set of parameters
pageName - the page for which data is potentially to be encoded
data - The data to check.
Returns:
true if state should be encoded into the encoding, false otherwise

setRequestCycle

public void setRequestCycle(IRequestCycle requestCycle)


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