org.icefaces.util

## Class FocusController

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

-     public class FocusController
      extends java.lang.Object

  Utility API for managing the element focus in the browser.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FocusController()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.lang.String` | `getFocus(javax.faces.context.FacesContext context)` Get the element ID the will receive focus during next update.
    `static java.lang.String` | `getReceivedFocus(javax.faces.context.FacesContext context)` Acquire the ID of the currently focused element in the browser.
    `static boolean` | `isFocusSet(javax.faces.context.FacesContext context)` Test if focus is defined for a certain element.
    `static void` | `setFocus(javax.faces.context.FacesContext context, java.lang.String id)` Set the element ID that should received focus during next update.

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

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

- - ### Constructor Detail

    - #### FocusController

          public FocusController()

  - ### Method Detail

    - #### getReceivedFocus

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

      Acquire the ID of the currently focused element in the browser.
      Parameters:
        `context` - the FacesContext
      Returns:
        the element ID

    - #### setFocus

          public static void setFocus(javax.faces.context.FacesContext context,
                                      java.lang.String id)

      Set the element ID that should received focus during next update.
      Parameters:
        `context` - the FacesContext
        `id` - the element ID

    - #### getFocus

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

      Get the element ID the will receive focus during next update.
      Parameters:
        `context` - the FacesContext
      Returns:
        the element ID

    - #### isFocusSet

          public static boolean isFocusSet(javax.faces.context.FacesContext context)

      Test if focus is defined for a certain element.
      Parameters:
        `context` - the FacesContext
      Returns:
        return true if focus is defined

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