org.apache.myfaces.component.html.util
Class HtmlComponentUtils

java.lang.Object
  extended by org.apache.myfaces.component.html.util.HtmlComponentUtils

public final class HtmlComponentUtils
extends Object

Utility class for providing basic functionality to the HTML faces extended components.

Version:
$Revision: 664580 $ $Date: 2008-06-08 19:21:01 -0500 (Sun, 08 Jun 2008) $
Author:
Sean Schofield

Method Summary
static javax.faces.component.UIComponent findParentNamingContainer(javax.faces.component.UIComponent component, boolean returnRootIfNotFound)
          Locates the NamingContainer associated with the givem UIComponent.
static String getClientId(javax.faces.component.UIComponent component, javax.faces.render.Renderer renderer, javax.faces.context.FacesContext context)
          Gets the client id associated with the component.
static String getLifecycleId(javax.servlet.ServletContext context)
          The getLifecycleId() is used for getting the id of the Lifecycle from the ServletContext.
static Map getParameterMap(javax.faces.component.UIComponent component)
          The getParameterMap() is used for getting the parameters of a specific component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClientId

public static String getClientId(javax.faces.component.UIComponent component,
                                 javax.faces.render.Renderer renderer,
                                 javax.faces.context.FacesContext context)
Gets the client id associated with the component. Checks the forceId attribute of the component (if present) and uses the orginally supplied id value if that attribute is true. Also performs the required call to convertClientId on the Renderer argument.

Parameters:
component - The component for which the client id is needed.
renderer - The renderer associated with the component.
context - Additional context information to help in the request.
Returns:
The clientId to use with the specified component.

findParentNamingContainer

public static javax.faces.component.UIComponent findParentNamingContainer(javax.faces.component.UIComponent component,
                                                                          boolean returnRootIfNotFound)
Locates the NamingContainer associated with the givem UIComponent.

Parameters:
component - The component whose naming locator needs to be found.
returnRootIfNotFound - Whether or not the root should be returned if no naming container is found.
Returns:
The parent naming container (or root if applicable).

getParameterMap

public static Map getParameterMap(javax.faces.component.UIComponent component)
The getParameterMap() is used for getting the parameters of a specific component.

Parameters:
component -
Returns:
the Map of the component.

getLifecycleId

public static String getLifecycleId(javax.servlet.ServletContext context)
The getLifecycleId() is used for getting the id of the Lifecycle from the ServletContext.

Parameters:
context -
Returns:
the id of the life cycle.


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