org.apache.myfaces.lifecycle
Interface RestoreViewSupport

All Known Implementing Classes:
DefaultRestoreViewSupport

public interface RestoreViewSupport

Support class for restore view phase

Version:
$Revision: 1533114 $ $Date: 2013-10-17 10:25:52 -0500 (Thu, 17 Oct 2013) $
Author:
Mathias Broekelmann (latest modification by $Author: lu4242 $)

Method Summary
 String calculateViewId(FacesContext facesContext)
           Calculates the view id from the given faces context by the following algorithm
 boolean checkViewExists(FacesContext facesContext, String viewId)
          Check if a view exists
 String deriveViewId(FacesContext context, String viewId)
          Deprecated. Use ViewHandler.deriveLogicalViewId
 boolean isPostback(FacesContext facesContext)
           Determine if the current request is a post back by the following algorithm.
 void processComponentBinding(FacesContext facesContext, UIComponent component)
          Processes the component tree.
 

Method Detail

calculateViewId

String calculateViewId(FacesContext facesContext)

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


deriveViewId

@Deprecated
String deriveViewId(FacesContext context,
                               String viewId)
Deprecated. Use ViewHandler.deriveLogicalViewId

Derive a view id retrieved from calling calculateViewId(FacesContext), but do not check if a resource with this name exists. This method is useful to retrieve a VDL instance, but note there are some cases (TCK test) where it is expected in Restore View algorithm a null or dummy viewId is passed.

Parameters:
context -
viewId -
Returns:

processComponentBinding

void processComponentBinding(FacesContext facesContext,
                             UIComponent component)
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

Parameters:
facesContext -
component - the root component

isPostback

boolean isPostback(FacesContext facesContext)

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.

Parameters:
facesContext -
Returns:

checkViewExists

boolean checkViewExists(FacesContext facesContext,
                        String viewId)
Check if a view exists

Parameters:
facesContext -
viewId -
Returns:


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