org.icefaces.util

## Class CoreComponentUtils

- java.lang.Object
- - org.icefaces.util.CoreComponentUtils

-     public class CoreComponentUtils
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CoreComponentUtils()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static javax.faces.component.UIComponent` | `findComponent(java.lang.String clientId, javax.faces.component.UIComponent base)` Find a component with an id specified in the following ways `:componetId - Absolute id, search starts at UIViewRoot componentId - Relative id, search starts at nearest parent namingContainer or ViewRoot :xN componentId - Numbered relative id, search starts at N'th parent naming container or ViewRoot`
    `static javax.faces.component.UIComponent` | `findComponentInView(javax.faces.component.UIComponent uiComponent, java.lang.String componentId)` A version of findComponent() that attempts to locate a component by id (not clientId) and searches into NamingContainers.
    `static java.lang.String` | `getFocusId(javax.faces.context.FacesContext context)` Return the id of the Element that currently has focus in the browser.
    `static void` | `setFocusId(java.lang.String focusId)` ICE-4417 Migrate method for setting focus id.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CoreComponentUtils

          public CoreComponentUtils()

  - ### Method Detail

    - #### findComponent

          public static javax.faces.component.UIComponent findComponent(java.lang.String clientId,
                                                                        javax.faces.component.UIComponent base)

      Find a component with an id specified in the following ways `

      - :componetId - Absolute id, search starts at UIViewRoot
      - componentId - Relative id, search starts at nearest parent namingContainer or ViewRoot
      - :xN componentId - Numbered relative id, search starts at N'th parent naming container or ViewRoot
      `
      Parameters:
        `clientId` - id of component
        `base` - UIComponent base to start searching from

    - #### findComponentInView

          public static javax.faces.component.UIComponent findComponentInView(javax.faces.component.UIComponent uiComponent,
                                                                              java.lang.String componentId)

      A version of findComponent() that attempts to locate a component by id (not clientId) and searches into NamingContainers. If there are more than one component with the provided id, the first one found will be returned
      Parameters:
        `uiComponent` - the base component to search from
        `componentId` - the id to search for

    - #### setFocusId

          public static void setFocusId(java.lang.String focusId)

      ICE-4417 Migrate method for setting focus id.
      Parameters:
        `focusId` - Id of component to get the focus

    - #### getFocusId

          public static java.lang.String getFocusId(javax.faces.context.FacesContext context)

      Return the id of the Element that currently has focus in the browser.
      Returns:
        String

Copyright 2025 ICEsoft Technologies Canada, Corp. All Rights Reserved.