Package org.eclnt.jsfserver.session
Class RequestFocusManager
java.lang.Object
org.eclnt.jsfserver.session.RequestFocusManager
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
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 Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
Blocks the request focus management for the current request processing.static long
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
Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side.static long
Returns a focus counter, so that the component that receives the focus counter will gain the focus on client side.
-
Field Details
-
REQFOCUS_CREATION
- See Also:
-
REQFOCUS_CREATION_LONG
public static final long REQFOCUS_CREATION_LONG- See Also:
-
-
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 togetNewRequestFocusCounter()
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 seeblockFocusMgmtForThisRequest()
. -
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 seeblockFocusMgmtForThisRequest()
. -
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.
-