org.apache.myfaces.view.facelets.el
Class CompositeComponentELUtils

java.lang.Object
  extended by org.apache.myfaces.view.facelets.el.CompositeComponentELUtils

public final class CompositeComponentELUtils
extends java.lang.Object

Utility class for composite components when used in EL Expressions --> #{cc}

Version:
$Revision: 943978 $ $Date: 2010-05-13 14:16:51 -0500 (Thu, 13 May 2010) $
Author:
Jakob Korherr (latest modification by $Author: jakobk $)

Field Summary
static java.lang.String CC_EXPRESSION_REGEX
          A regular expression used to determine if cc is used in an expression String.
static java.lang.String COMPONENT_STACK
          The key under which the component stack is stored in the FacesContext.
static java.lang.String CURRENT_COMPOSITE_COMPONENT_KEY
          The key under which the current composite component is stored in the attribute map of the FacesContext.
static java.lang.String LOCATION_KEY
          The key under which the Location of the composite componente is stored in the attributes map of the component by InterfaceHandler.
 
Method Summary
static java.util.LinkedList<UIComponent> getComponentStack(FacesContext facesContext)
          Gets the current component stack from the FacesContext.
static UIComponent getCompositeComponentBasedOnLocation(FacesContext facesContext, Location location)
          Trys to find a composite component on the composite component stack and using UIComponent.getCurrentCompositeComponent() based on the location of the facelet page that generated the composite component.
static boolean isCompositeComponentExpression(java.lang.String expression)
          Tests if the expression refers to the current composite component: #{cc}
static void removeCompositeComponentForResolver(FacesContext facesContext)
          Removes the composite component from the attribute map of the FacesContext.
static void saveCompositeComponentForResolver(FacesContext facesContext, Location location)
          Trys to get the composite component using getCompositeComponentBasedOnLocation() and saves it in an attribute on the FacesContext, which is then used by CompositeComponentImplicitObject.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COMPONENT_STACK

public static final java.lang.String COMPONENT_STACK
The key under which the component stack is stored in the FacesContext. ATTENTION: this constant is duplicate in UIComponent.


CURRENT_COMPOSITE_COMPONENT_KEY

public static final java.lang.String CURRENT_COMPOSITE_COMPONENT_KEY
The key under which the current composite component is stored in the attribute map of the FacesContext.

See Also:
Constant Field Values

LOCATION_KEY

public static final java.lang.String LOCATION_KEY
The key under which the Location of the composite componente is stored in the attributes map of the component by InterfaceHandler.

See Also:
Constant Field Values

CC_EXPRESSION_REGEX

public static final java.lang.String CC_EXPRESSION_REGEX
A regular expression used to determine if cc is used in an expression String.

See Also:
Constant Field Values
Method Detail

getCompositeComponentBasedOnLocation

public static UIComponent getCompositeComponentBasedOnLocation(FacesContext facesContext,
                                                               Location location)
Trys to find a composite component on the composite component stack and using UIComponent.getCurrentCompositeComponent() based on the location of the facelet page that generated the composite component.

Parameters:
facesContext -
location -
Returns:

getComponentStack

public static java.util.LinkedList<UIComponent> getComponentStack(FacesContext facesContext)
Gets the current component stack from the FacesContext.

Parameters:
facesContext -
Returns:

saveCompositeComponentForResolver

public static void saveCompositeComponentForResolver(FacesContext facesContext,
                                                     Location location)
Trys to get the composite component using getCompositeComponentBasedOnLocation() and saves it in an attribute on the FacesContext, which is then used by CompositeComponentImplicitObject.

Parameters:
facesContext -
location -

removeCompositeComponentForResolver

public static void removeCompositeComponentForResolver(FacesContext facesContext)
Removes the composite component from the attribute map of the FacesContext.

Parameters:
facesContext -

isCompositeComponentExpression

public static boolean isCompositeComponentExpression(java.lang.String expression)
Tests if the expression refers to the current composite component: #{cc}

Returns:


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