org.alfresco.web.app
Class AlfrescoVariableResolver

java.lang.Object
  extended by javax.faces.el.VariableResolver
      extended by org.springframework.web.jsf.DelegatingVariableResolver
          extended by org.alfresco.web.app.AlfrescoVariableResolver

public class AlfrescoVariableResolver
extends org.springframework.web.jsf.DelegatingVariableResolver

JSF VariableResolver that first delegates to the Spring JSF variable resolver. The sole purpose of this variable resolver is to look out for the Container variable. If this variable is encountered the current viewId is examined. If the current viewId matches a configured dialog or wizard container the appropriate manager object is returned i.e. DialogManager or WizardManager.

Configure this resolver in your faces-config.xml file as follows:

 <application>
   ...
   <variable-resolver>org.alfresco.web.app.AlfrescoVariableResolver</variable-resolver>
 </application>

See Also:
DialogManager, WizardManager

Field Summary
protected  java.util.List dialogContainers
           
protected  java.util.List wizardContainers
           
 
Fields inherited from class org.springframework.web.jsf.DelegatingVariableResolver
originalVariableResolver
 
Constructor Summary
AlfrescoVariableResolver(javax.faces.el.VariableResolver originalVariableResolver)
          Creates a new VariableResolver.
 
Method Summary
protected  java.util.List getDialogContainers(javax.faces.context.FacesContext context)
          Retrieves the list of configured dialog container pages
protected  java.util.List getWizardContainers(javax.faces.context.FacesContext context)
          Retrieves the list of configured wizard container pages
 java.lang.Object resolveVariable(javax.faces.context.FacesContext context, java.lang.String name)
          Resolves the variable with the given name.
 
Methods inherited from class org.springframework.web.jsf.DelegatingVariableResolver
getBeanFactory, getOriginalVariableResolver, getWebApplicationContext, resolveOriginal, resolveSpringBean
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dialogContainers

protected java.util.List dialogContainers

wizardContainers

protected java.util.List wizardContainers
Constructor Detail

AlfrescoVariableResolver

public AlfrescoVariableResolver(javax.faces.el.VariableResolver originalVariableResolver)
Creates a new VariableResolver.

Parameters:
originalVariableResolver - The original variable resolver
Method Detail

resolveVariable

public java.lang.Object resolveVariable(javax.faces.context.FacesContext context,
                                        java.lang.String name)
                                 throws javax.faces.el.EvaluationException
Resolves the variable with the given name.

This implementation will first delegate to the Spring variable resolver. If the variable is not found by the Spring resolver and the variable name is Container the current viewId is examined. If the current viewId matches a configured dialog or wizard container the appropriate manager object is returned i.e. DialogManager or WizardManager.

Overrides:
resolveVariable in class org.springframework.web.jsf.DelegatingVariableResolver
Parameters:
context - FacesContext
name - The name of the variable to resolve
Throws:
javax.faces.el.EvaluationException

getDialogContainers

protected java.util.List getDialogContainers(javax.faces.context.FacesContext context)
Retrieves the list of configured dialog container pages

Parameters:
context - FacesContext
Returns:
The container pages

getWizardContainers

protected java.util.List getWizardContainers(javax.faces.context.FacesContext context)
Retrieves the list of configured wizard container pages

Parameters:
context - FacesContext
Returns:
The container page


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.