org.apache.myfaces.component.html.util
Class HtmlComponentUtils
java.lang.Object
org.apache.myfaces.component.html.util.HtmlComponentUtils
public class HtmlComponentUtils
extends java.lang.Object
Utility class for providing basic functionality to the HTML faces
extended components.
$Revision: 215977 $ $Date: 2005-07-12 17:56:11 +0200 (Tue, 12 Jul 2005) $static UIComponent | findParentNamingContainer(UIComponent component, boolean returnRootIfNotFound) - Locates the
NamingContainer associated with the givem
UIComponent .
|
static String | getClientId(UIComponent component, Renderer renderer, FacesContext context) - Gets the client id associated with the component.
|
findParentNamingContainer
public static UIComponent findParentNamingContainer(UIComponent component,
boolean returnRootIfNotFound)
Locates the NamingContainer
associated with the givem
UIComponent
.
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.
- The parent naming container (or root if applicable).
getClientId
public static String getClientId(UIComponent component,
Renderer renderer,
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.
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.
- The clientId to use with the specified component.