org.eclnt.jsfserver.session

## Class RequestFocusManager

- java.lang.Object
- - org.eclnt.jsfserver.session.RequestFocusManager

-     public class RequestFocusManager
      extends java.lang.Object

  Components may request to obtain the focus at client side. This is done by using the component attribute REQUESTFOCUS. The component that requests the focus does so by setting the attribute to a new "highest" value.
  This utility function does keep the highest value per session and returns this value by `getNewRequestFocusCounter()`. The value is increased with each request processing - within the request processing all components obtain the same result.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RequestFocusManager()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `blockFocusMgmtForThisRequest()` Blocks the request focus management for the current request processing.
    `static long` | `getCreationRequestFocusCounter()` Returns a special counter that indicates to the client that a certain component should obtain the focus once it is shown - and afterwards does not do any special focus management anymore.
    `static long` | `getNewRequestFocusCounter()` Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side.
    `static long` | `getNewRequestFocusInWindowCounter()` Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side.

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

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

- - ### Constructor Detail

    - #### RequestFocusManager

          public RequestFocusManager()

  - ### Method Detail

    - #### blockFocusMgmtForThisRequest

          public static void blockFocusMgmtForThisRequest()

      Blocks the request focus management for the current request processing. If blocked, then subsequent calls to `getNewRequestFocusCounter()` will not receive a result, so that the focus will be assigned to the corresponding component, but will receive a result that has no influence on focus setting.

    - #### getNewRequestFocusCounter

          public static long getNewRequestFocusCounter()

      Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side. The focus is assigned in a way that the corresponding dialog window will try to be pushed into the front.
      Please also see `blockFocusMgmtForThisRequest()`.

    - #### getNewRequestFocusInWindowCounter

          public static long getNewRequestFocusInWindowCounter()

      Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side. The focus is assigned in a way that the corresponding dialog window will not be pushed to the front.
      Please also see `blockFocusMgmtForThisRequest()`.

    - #### getCreationRequestFocusCounter

          public static long getCreationRequestFocusCounter()

      Returns a special counter that indicates to the client that a certain component should obtain the focus once it is shown - and afterwards does not do any special focus management anymore.

Copyright © CaptainCasa Gmbh. All Rights Reserved.