Class RequestFocusManager

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

public class RequestFocusManager extends 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.
  • Field Details

  • Constructor Details

    • RequestFocusManager

      public RequestFocusManager()
  • Method Details

    • 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.