Class ClientWindowWrapper
- java.lang.Object
- 
- jakarta.faces.lifecycle.ClientWindow
- 
- jakarta.faces.lifecycle.ClientWindowWrapper
 
 
- 
- All Implemented Interfaces:
- FacesWrapper<ClientWindow>
 
 public abstract class ClientWindowWrapper extends ClientWindow implements FacesWrapper<ClientWindow> Wrapper for ClientWindowUsage: extend this class and push the implementation being wrapped to the constructor and use getWrapped()to access the instance being wrapped.- Since:
- 2.2
 
- 
- 
Field Summary- 
Fields inherited from class jakarta.faces.lifecycle.ClientWindowCLIENT_WINDOW_MODE_PARAM_NAME, NUMBER_OF_CLIENT_WINDOWS_PARAM_NAME
 
- 
 - 
Constructor SummaryConstructors Constructor Description ClientWindowWrapper()Deprecated.Use the other constructor taking the implementation being wrapped.ClientWindowWrapper(ClientWindow wrapped)If this client window has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecode(FacesContext context)The implementation is responsible for examining the incoming request and extracting the value that must be returned from theClientWindow.getId()method.voiddisableClientWindowRenderMode(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.voidenableClientWindowRenderMode(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.StringgetId()Return a String value that uniquely identifies thisClientWindowwithin the scope of the current session.Map<String,String>getQueryURLParameters(FacesContext context)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.ClientWindowgetWrapped()A class that implements this interface uses this method to return an instance of the class being wrapped.booleanisClientWindowRenderModeEnabled(FacesContext context)Methods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so.
 
- 
- 
- 
Constructor Detail- 
ClientWindowWrapper@Deprecated public ClientWindowWrapper() Deprecated.Use the other constructor taking the implementation being wrapped.
 - 
ClientWindowWrapperpublic ClientWindowWrapper(ClientWindow wrapped) If this client window has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor. The getWrapped()will then return the implementation being wrapped.- Parameters:
- wrapped- The implementation being wrapped.
- Since:
- 2.3
 
 
- 
 - 
Method Detail- 
getWrappedpublic ClientWindow getWrapped() Description copied from interface:FacesWrapperA class that implements this interface uses this method to return an instance of the class being wrapped. - Specified by:
- getWrappedin interface- FacesWrapper<ClientWindow>
- Returns:
- the wrapped instance.
 
 - 
getIdpublic String getId() Description copied from class:ClientWindowReturn a String value that uniquely identifies this ClientWindowwithin the scope of the current session. SeeClientWindow.decode(jakarta.faces.context.FacesContext)for the specification of how to derive this value.- Specified by:
- getIdin class- ClientWindow
- Returns:
- the id of the ClientWindow
 
 - 
getQueryURLParameterspublic Map<String,String> getQueryURLParameters(FacesContext context) Description copied from class:ClientWindowThis 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 ClientWindowimplementations that they will have the opportunity to insert any additional client window specific information in any case where a URL is generated, such as the rendering of hyperlinks. The returned map must be immutable. The default implementation of this method returns the empty map.- Specified by:
- getQueryURLParametersin class- ClientWindow
- Parameters:
- context- the- FacesContextfor this request.
- Returns:
- nullor a map of parameters to insert into the URL query string.
 
 - 
disableClientWindowRenderModepublic void disableClientWindowRenderMode(FacesContext context) Description copied from class:ClientWindowComponents 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 ClientWindow.enableClientWindowRenderMode(jakarta.faces.context.FacesContext)from afinallyblock after rendering the URL. IfClientWindow.CLIENT_WINDOW_MODE_PARAM_NAMEis "url" without the quotes, all generated URLs that cause a GET request must append the ClientWindow by default. This is specified as a static method because callsites need to access it without having access to an actualClientWindowinstance.- Overrides:
- disableClientWindowRenderModein class- ClientWindow
- Parameters:
- context- the- FacesContextfor this request.
 
 - 
enableClientWindowRenderModepublic void enableClientWindowRenderMode(FacesContext context) Description copied from class:ClientWindowComponents that permit per-use disabling of the appending of the ClientWindow in generated URLs must call this method first after rendering those URLs. If ClientWindow.CLIENT_WINDOW_MODE_PARAM_NAMEis "url" without the quotes, all generated URLs that cause a GET request must append the ClientWindow by default. This is specified as a static method because callsites need to access it without having access to an actualClientWindowinstance.- Overrides:
- enableClientWindowRenderModein class- ClientWindow
- Parameters:
- context- the- FacesContextfor this request.
 
 - 
isClientWindowRenderModeEnabledpublic boolean isClientWindowRenderModeEnabled(FacesContext context) Description copied from class:ClientWindowMethods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so. If ClientWindow.CLIENT_WINDOW_MODE_PARAM_NAMEis "url" without the quotes, all generated URLs that cause a GET request must append the ClientWindow by default. This is specified as a static method because callsites need to access it without having access to an actualClientWindowinstance.- Overrides:
- isClientWindowRenderModeEnabledin class- ClientWindow
- Parameters:
- context- the- FacesContextfor this request.
- Returns:
- the result as specified above
 
 - 
decodepublic void decode(FacesContext context) Description copied from class:ClientWindowThe implementation is responsible for examining the incoming request and extracting the value that must be returned from the ClientWindow.getId()method. IfClientWindow.CLIENT_WINDOW_MODE_PARAM_NAMEis "none" this method must not be invoked. IfClientWindow.CLIENT_WINDOW_MODE_PARAM_NAMEis "url" the implementation must first look for a request parameter under the name given by the value ofResponseStateManager.CLIENT_WINDOW_PARAM. If no value is found, look for a request parameter under the name given by the value ofResponseStateManager.CLIENT_WINDOW_URL_PARAM. If no value is found, fabricate an id that uniquely identifies thisClientWindowwithin the scope of the current session. This value must be made available to return from theClientWindow.getId()method. The value must be suitable for inclusion as a hidden field or query parameter. If a value is found, decrypt it using the key from the session and make it available for return fromClientWindow.getId().- Specified by:
- decodein class- ClientWindow
- Parameters:
- context- the- FacesContextfor this request.
 
 
- 
 
-