org.apache.myfaces.custom.util
Class ComponentUtils

java.lang.Object
  extended by org.apache.myfaces.custom.util.ComponentUtils

public final class ComponentUtils
extends java.lang.Object

User: treeder Date: Nov 21, 2005 Time: 9:20:14 PM


Method Summary
static void decorateEventAttribute(javax.faces.component.UIComponent component, java.lang.String attribute, java.lang.String value)
          Changes the event attributes like onclick by appending the given value
static javax.faces.component.UIComponent findComponentByClientId(javax.faces.context.FacesContext context, javax.faces.component.UIComponent root, java.lang.String clientId)
          TR- This was moved from AjaxPhaseListenere on checkin 344383
static javax.faces.component.UIComponent findComponentById(javax.faces.context.FacesContext context, javax.faces.component.UIComponent root, java.lang.String id)
          Useful if you don't know the clientId

TR- This was moved from AjaxPhaseListenere on checkin 344383 Seems like this could be made more efficient

static javax.faces.component.UIComponent findFirstMessagesComponent(javax.faces.context.FacesContext context, javax.faces.component.UIComponent base)
           
static java.util.List getHTMLDataTableColumns(javax.faces.component.html.HtmlDataTable table)
          This method is used for getting the columns of a specific HTMLDataTable.
static java.lang.String getLifecycleId(javax.servlet.ServletContext context)
          The getLifecycleId() is used for getting the id of the Lifecycle from the ServletContext.
static java.util.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

findComponentByClientId

public static javax.faces.component.UIComponent findComponentByClientId(javax.faces.context.FacesContext context,
                                                                        javax.faces.component.UIComponent root,
                                                                        java.lang.String clientId)
TR- This was moved from AjaxPhaseListenere on checkin 344383

Parameters:
context -
root -
clientId -
Returns:
component referenced by clientId or null if not found

findComponentById

public static javax.faces.component.UIComponent findComponentById(javax.faces.context.FacesContext context,
                                                                  javax.faces.component.UIComponent root,
                                                                  java.lang.String id)
Useful if you don't know the clientId

TR- This was moved from AjaxPhaseListenere on checkin 344383 Seems like this could be made more efficient

Parameters:
context -
root -
id -
Returns:
component referenced by id or null if not found

findFirstMessagesComponent

public static javax.faces.component.UIComponent findFirstMessagesComponent(javax.faces.context.FacesContext context,
                                                                           javax.faces.component.UIComponent base)

decorateEventAttribute

public static void decorateEventAttribute(javax.faces.component.UIComponent component,
                                          java.lang.String attribute,
                                          java.lang.String value)
Changes the event attributes like onclick by appending the given value

Parameters:
component - UIComponent instance that the attribute belongs to
attribute - Attribute to be changed
value - Value to be appended

getParameterMap

public static java.util.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 java.lang.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.

getHTMLDataTableColumns

public static java.util.List getHTMLDataTableColumns(javax.faces.component.html.HtmlDataTable table)
This method is used for getting the columns of a specific HTMLDataTable.

Parameters:
table -
Returns:
the List of UIColumns


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