Coverage Report - org.trails.record.FormClientPropertyPersistenceScope
 
Classes in this File Line Coverage Branch Coverage Complexity
FormClientPropertyPersistenceScope
0% 
N/A 
1
 
 1  
 package org.trails.record;
 2  
 
 3  
 import org.apache.tapestry.IRequestCycle;
 4  
 import org.apache.tapestry.engine.ServiceEncoding;
 5  
 import org.apache.tapestry.record.AbstractPrefixedClientPropertyPersistenceScope;
 6  
 import org.apache.tapestry.record.PersistentPropertyData;
 7  
 
 8  
 /**
 9  
  * Based on com.zillow.web.infrastructure.FormClientPropertyPersistenceStrategy
 10  
  * described in http://wiki.apache.org/jakarta-tapestry/FormClientPersistence
 11  
  */
 12  
 public class FormClientPropertyPersistenceScope extends AbstractPrefixedClientPropertyPersistenceScope
 13  
 {
 14  
         private IRequestCycle _requestCycle;
 15  
 
 16  
         public FormClientPropertyPersistenceScope()
 17  
         {
 18  0
                 super("form:");
 19  0
         }
 20  
 
 21  
         public boolean shouldEncodeState(ServiceEncoding encoding, String pageName, PersistentPropertyData data)
 22  
         {
 23  0
                 return pageName.equals(_requestCycle.getPage().getPageName());
 24  
         }
 25  
 
 26  
         public void setRequestCycle(IRequestCycle requestCycle)
 27  
         {
 28  0
                 _requestCycle = requestCycle;
 29  0
         }
 30  
 
 31  
 }