org.apache.myfaces.test.mock.lifecycle
Class DefaultRestoreViewSupport

java.lang.Object
  extended by org.apache.myfaces.test.mock.lifecycle.DefaultRestoreViewSupport
All Implemented Interfaces:
RestoreViewSupport

public class DefaultRestoreViewSupport
extends Object
implements RestoreViewSupport

Since:
1.0.0
Version:
$Revision: 517403 $ $Date: 2007-03-12 22:17:00 +0100 (Mo, 12 Mrz 2007) $
Author:
Mathias Broekelmann (latest modification by $Author: mbr $)

Constructor Summary
DefaultRestoreViewSupport()
           
 
Method Summary
 String calculateViewId(javax.faces.context.FacesContext facesContext)
           Calculates the view id from the given faces context by the following algorithm
 boolean isPostback(javax.faces.context.FacesContext facesContext)
           Determine if the current request is a post back by the following algorithm.
 void processComponentBinding(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component)
          Processes the component tree.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultRestoreViewSupport

public DefaultRestoreViewSupport()
Method Detail

processComponentBinding

public void processComponentBinding(javax.faces.context.FacesContext facesContext,
                                    javax.faces.component.UIComponent component)
Description copied from interface: RestoreViewSupport
Processes the component tree. For each component (including the given one) in the tree determine if a value expression for the attribute "binding" is defined. If the expression is not null set the component instance to the value of this expression

Specified by:
processComponentBinding in interface RestoreViewSupport
component - the root component

calculateViewId

public String calculateViewId(javax.faces.context.FacesContext facesContext)
Description copied from interface: RestoreViewSupport

Calculates the view id from the given faces context by the following algorithm

Specified by:
calculateViewId in interface RestoreViewSupport

isPostback

public boolean isPostback(javax.faces.context.FacesContext facesContext)
Description copied from interface: RestoreViewSupport

Determine if the current request is a post back by the following algorithm.

Find the render-kit-id for the current request by calling calculateRenderKitId() on the Application’s ViewHandler. Get that RenderKit’s ResponseStateManager and call its isPostback() method, passing the given FacesContext.

Specified by:
isPostback in interface RestoreViewSupport
Returns:


Copyright © 2011 The Apache Software Foundation. All Rights Reserved.