This class represents a client window, which may be a browser tab, browser window, browser pop-up, portlet, or
anything else that can display a jakarta. hierarchy rooted at a
jakarta..
Modes of Operation
none mode
The generation of
ClientWindowis controlled by the value of thecontext-paramnamed by the value ofCLIENT_WINDOW_MODE_PARAM_NAME. If thiscontext-paramis not specified, or its value is "none", noClientWindowinstances will be generated, and the entire feature is effectively disabled for the entire application.Other modes
To accomadate the widest possible range of implementation choices to support this feature, explicit names for modes other than "none" and "url" are not specified. However, for all values of
CLIENT_WINDOW_MODE_PARAM_NAME, the lifetime of aClientWindowstarts on the first request made by a particular client window (or tab, or pop-up, etc) to the Jakarta Faces runtime and persists as long as that window remains open or the session expires, whichever comes first. A client window is always associated with exactly oneUIViewRootinstance at a time, but may display many differentUIViewRoots during its lifetime.The
ClientWindowinstance is associated with the incoming request during theLifecycle#attachWindowmethod. This method will cause a new instance ofClientWindowto be created, assigned an id, and passed tojakarta..faces. context. ExternalContext#setClientWindow During state saving, regardless of the window id mode, or state saving mode, for ajax and non-ajax requests, a hidden field must be written whose name, id and value are given as specified in
jakarta..faces. render. ResponseStateManager#CLIENT_WINDOW_PARAM In addition to the hidden field already described. The runtime must ensure that any component that renders a hyperlink that causes the user agent to send a GET request to the Faces server when it is clicked has a query parameter with a name and value specified in
ResponseStateManager#CLIENT_WINDOW_URL_PARAM. This requirement is met by several of the "encode" methods onjakarta.. Seefaces. context. ExternalContext jakarta.for details.faces. context. ExternalContext#encodeActionURL(java. lang. String)
| Modifier and Type | Field and Description |
|---|---|
| public static final String | CLIENT_WINDOW_MODE_PARAM_NAME
The context-param that controls the operation of the |
| public static final String | NUMBER_OF_CLIENT_WINDOWS_PARAM_NAME
Indicate the max number of ClientWindows, which is used by |
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public abstract void | decode(FacesContext
the context)FacesContext for this request.
The implementation is responsible for examining the incoming request and extracting the value that must be returned
from the |
| public void | disableClientWindowRenderMode(FacesContext
the context)FacesContext for this request.Components that permit per-use disabling of the appending of the ClientWindow in generated URLs must call this method first before rendering those URLs. |
| public void | enableClientWindowRenderMode(FacesContext
the context)FacesContext for this request.Components that permit per-use disabling of the appending of the ClientWindow in generated URLs must call this method first after rendering those URLs. |
| public abstract String | Returns: the id of theClientWindow
Return a String value that uniquely identifies this |
| public abstract Map | Returns: null or a map of parameters to insert into the URL query string.the context)FacesContext for this request.This method will be called whenever a URL is generated by the runtime where client window related parameters need to be inserted into the URL. |
| public boolean | Returns: the result as specified abovethe context)FacesContext for this request.Methods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so. |
| CLIENT_WINDOW_MODE_PARAM_NAME | back to summary |
|---|---|
| public static final String CLIENT_WINDOW_MODE_PARAM_NAME
The context-param that controls the operation of the
| |
| NUMBER_OF_CLIENT_WINDOWS_PARAM_NAME | back to summary |
|---|---|
| public static final String NUMBER_OF_CLIENT_WINDOWS_PARAM_NAME
Indicate the max number of ClientWindows, which is used by
| |
| PER_USE_CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED_KEY | back to summary |
|---|---|
| private static final String PER_USE_CLIENT_WINDOW_URL_QUERY_PARAMETER_DISABLED_KEY | |
| ClientWindow | back to summary |
|---|---|
| public ClientWindow() | |
| decode | back to summary |
|---|---|
| public abstract void decode(FacesContext context)
The implementation is responsible for examining the incoming request and extracting the value that must be returned
from the
| |
| disableClientWindowRenderMode | back to summary |
|---|---|
| public void disableClientWindowRenderMode(FacesContext context)
Components that permit per-use disabling of the appending of the ClientWindow in generated URLs must call this method
first before rendering those URLs. The caller must call
| |
| enableClientWindowRenderMode | back to summary |
|---|---|
| public void enableClientWindowRenderMode(FacesContext context)
Components that permit per-use disabling of the appending of the ClientWindow in generated URLs must call this method
first after rendering those URLs. If
| |
| getId | back to summary |
|---|---|
| public abstract String getId()
Return a String value that uniquely identifies this
| |
| getQueryURLParameters | back to summary |
|---|---|
| public abstract Map
This method will be called whenever a URL is generated by the runtime where client window related parameters need to
be inserted into the URL. This guarantees custom
| |
| isClientWindowRenderModeEnabled | back to summary |
|---|---|
| public boolean isClientWindowRenderModeEnabled(FacesContext context)
Methods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so.
If
| |