org.springframework.webflow.executor.jsf
Class FlowPropertyResolver

java.lang.Object
  extended by javax.faces.el.PropertyResolver
      extended by org.springframework.webflow.executor.jsf.AbstractFlowExecutionPropertyResolver
          extended by org.springframework.webflow.executor.jsf.FlowPropertyResolver

public class FlowPropertyResolver
extends AbstractFlowExecutionPropertyResolver

Custom property resolver that resolves flow session scope attributes of the current flow execution. This resolver will also create and set the attribute value to a bean from the root Spring Web Application Context if the value does not already exist, allowing for lazy-initialized binding variables. Designed mainly to be used with the FlowVariableResolver. This is the original property resolver implemented with Spring Web Flow 1.0. In general, prefer DelegatingFlowVariableResolver or FlowExecutionVariableResolver over use of this class. Also, consider use of the DelegatingVariableResolver as an alternative to accessing lazy-initialized binding variables managed by a Spring application context that uses custom bean scopes.

Author:
Colin Sampaleanu, Keith Donald

Constructor Summary
FlowPropertyResolver(javax.faces.el.PropertyResolver resolverDelegate)
          Creates a new flow execution property resolver that resolves flow scope attributes.
 
Method Summary
protected  java.lang.Object doGetAttribute(FlowExecution execution, java.lang.String attributeName)
          Gets the value of the flow execution attribute.
protected  java.lang.Class doGetAttributeType(FlowExecution execution, java.lang.String attributeName)
          Gets the type of value returned by the flow execution attribute.
protected  void doSetAttribute(FlowExecution execution, java.lang.String attributeName, java.lang.Object attributeValue)
          Sets the value of the flow execution attribute.
protected  org.springframework.web.context.WebApplicationContext getWebApplicationContext(javax.faces.context.FacesContext facesContext)
          Retrieve the web application context to delegate bean name resolution to.
 
Methods inherited from class org.springframework.webflow.executor.jsf.AbstractFlowExecutionPropertyResolver
getResolverDelegate, getType, getType, getValue, getValue, isReadOnly, isReadOnly, setValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowPropertyResolver

public FlowPropertyResolver(javax.faces.el.PropertyResolver resolverDelegate)
Creates a new flow execution property resolver that resolves flow scope attributes.

Parameters:
resolverDelegate - the resolver to delegate to when the property is not a flow execution attribute
Method Detail

doGetAttributeType

protected java.lang.Class doGetAttributeType(FlowExecution execution,
                                             java.lang.String attributeName)
Description copied from class: AbstractFlowExecutionPropertyResolver
Gets the type of value returned by the flow execution attribute.

Specified by:
doGetAttributeType in class AbstractFlowExecutionPropertyResolver
Parameters:
execution - the flow execution
attributeName - the name of the attribute
Returns:
the type of value returned by the attribute

doGetAttribute

protected java.lang.Object doGetAttribute(FlowExecution execution,
                                          java.lang.String attributeName)
Description copied from class: AbstractFlowExecutionPropertyResolver
Gets the value of the flow execution attribute.

Specified by:
doGetAttribute in class AbstractFlowExecutionPropertyResolver
Parameters:
execution - the flow execution
attributeName - the name of the attribute
Returns:
the attribute value

doSetAttribute

protected void doSetAttribute(FlowExecution execution,
                              java.lang.String attributeName,
                              java.lang.Object attributeValue)
Description copied from class: AbstractFlowExecutionPropertyResolver
Sets the value of the flow execution attribute.

Specified by:
doSetAttribute in class AbstractFlowExecutionPropertyResolver
Parameters:
execution - the flow execution
attributeName - the name of the attribute
attributeValue - the attribute value

getWebApplicationContext

protected org.springframework.web.context.WebApplicationContext getWebApplicationContext(javax.faces.context.FacesContext facesContext)
Retrieve the web application context to delegate bean name resolution to. Default implementation delegates to FacesContextUtils.

Parameters:
facesContext - the current JSF context
Returns:
the Spring web application context (never null)
See Also:
FacesContextUtils.getRequiredWebApplicationContext(javax.faces.context.FacesContext)


Copyright © 2004-2007. All Rights Reserved.