Top Description Fields Constructors Methods
javax.faces.lifecycle

public abstract Class ClientWindowWrapper

extends ClientWindow
implements FacesWrapper<ClientWindow>
Class Inheritance
All Implemented Interfaces
javax.faces.FacesWrapper
Imports
java.util.Map, javax.faces.FacesWrapper, javax.faces.context.FacesContext

Wrapper for ClientWindow

Usage: 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

Modifier and TypeField and Description
private ClientWindow
Inherited from javax.faces.lifecycle.ClientWindow:
CLIENT_WINDOW_MODE_PARAM_NAME

Constructor Summary

AccessConstructor and Description
public
ClientWindowWrapper()

Deprecated Use the other constructor taking the implementation being wrapped.
public
ClientWindowWrapper(ClientWindow
The implementation being wrapped.
wrapped
)

If this client window has been decorated, the implementation doing the decorating should push the implementation being wrapped to this constructor.

Method Summary

Modifier and TypeMethod and Description
public void
decode(FacesContext
the FacesContext for this request.
context
)

Implements abstract javax.faces.lifecycle.ClientWindow.decode.

The implementation is responsible for examining the incoming request and extracting the value that must be returned from the getId method.

public void
disableClientWindowRenderMode(FacesContext
the FacesContext for this request.
context
)

Overrides javax.faces.lifecycle.ClientWindow.disableClientWindowRenderMode.

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 FacesContext for this request.
context
)

Overrides javax.faces.lifecycle.ClientWindow.enableClientWindowRenderMode.

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 String
getId()

Implements abstract javax.faces.lifecycle.ClientWindow.getId.

Return a String value that uniquely identifies this ClientWindow within the scope of the current session.

public Map<String, String>
getQueryURLParameters(FacesContext
the FacesContext for this request.
context
)

Implements abstract javax.faces.lifecycle.ClientWindow.getQueryURLParameters.

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 ClientWindow
getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

public boolean
isClientWindowRenderModeEnabled(FacesContext
the FacesContext for this request.
context
)

Overrides javax.faces.lifecycle.ClientWindow.isClientWindowRenderModeEnabled.

Methods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so.

Field Detail

wrappedback to summary
private ClientWindow wrapped

Constructor Detail

ClientWindowWrapperback to summary
public ClientWindowWrapper()

Deprecated

Use the other constructor taking the implementation being wrapped.

Annotations
@Deprecated
ClientWindowWrapperback to summary
public 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:ClientWindow

The implementation being wrapped.

Since
2.3

Method Detail

decodeback to summary
public void decode(FacesContext context)

Implements abstract javax.faces.lifecycle.ClientWindow.decode.

Doc from javax.faces.lifecycle.ClientWindow.decode.

The implementation is responsible for examining the incoming request and extracting the value that must be returned from the getId method. If CLIENT_WINDOW_MODE_PARAM_NAME is "none" this method must not be invoked. If CLIENT_WINDOW_MODE_PARAM_NAME is "url" the implementation must first look for a request parameter under the name given by the value of javax.faces.render.ResponseStateManager#CLIENT_WINDOW_PARAM. If no value is found, look for a request parameter under the name given by the value of javax.faces.render.ResponseStateManager#CLIENT_WINDOW_URL_PARAM. If no value is found, fabricate an id that uniquely identifies this ClientWindow within the scope of the current session. This value must be made available to return from the 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 from getId.

Parameters
context:FacesContext

the FacesContext for this request.

Annotations
@Override
disableClientWindowRenderModeback to summary
public void disableClientWindowRenderMode(FacesContext context)

Overrides javax.faces.lifecycle.ClientWindow.disableClientWindowRenderMode.

Doc from javax.faces.lifecycle.ClientWindow.disableClientWindowRenderMode.

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(javax.faces.context.FacesContext) from a finally block after rendering the URL. If CLIENT_WINDOW_MODE_PARAM_NAME is "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 actual ClientWindow instance.

Parameters
context:FacesContext

the FacesContext for this request.

Annotations
@Override
enableClientWindowRenderModeback to summary
public void enableClientWindowRenderMode(FacesContext context)

Overrides javax.faces.lifecycle.ClientWindow.enableClientWindowRenderMode.

Doc from javax.faces.lifecycle.ClientWindow.enableClientWindowRenderMode.

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 CLIENT_WINDOW_MODE_PARAM_NAME is "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 actual ClientWindow instance.

Parameters
context:FacesContext

the FacesContext for this request.

Annotations
@Override
getIdback to summary
public String getId()

Implements abstract javax.faces.lifecycle.ClientWindow.getId.

Doc from javax.faces.lifecycle.ClientWindow.getId.

Return a String value that uniquely identifies this ClientWindow within the scope of the current session. See decode for the specification of how to derive this value.

Returns:String

the id of the ClientWindow

Annotations
@Override
getQueryURLParametersback to summary
public Map<String, String> getQueryURLParameters(FacesContext context)

Implements abstract javax.faces.lifecycle.ClientWindow.getQueryURLParameters.

Doc from javax.faces.lifecycle.ClientWindow.getQueryURLParameters.

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 ClientWindow implementations 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.

Parameters
context:FacesContext

the FacesContext for this request.

Returns:Map<String, String>

null or a map of parameters to insert into the URL query string.

Annotations
@Override
getWrappedback to summary
public ClientWindow getWrapped()

Implements javax.faces.FacesWrapper.getWrapped.

Doc from javax.faces.FacesWrapper.getWrapped.

A class that implements this interface uses this method to return an instance of the class being wrapped.

Returns:ClientWindow

the wrapped instance.

Annotations
@Override
isClientWindowRenderModeEnabledback to summary
public boolean isClientWindowRenderModeEnabled(FacesContext context)

Overrides javax.faces.lifecycle.ClientWindow.isClientWindowRenderModeEnabled.

Doc from javax.faces.lifecycle.ClientWindow.isClientWindowRenderModeEnabled.

Methods that append the ClientWindow to generated URLs must call this method to see if they are permitted to do so. If CLIENT_WINDOW_MODE_PARAM_NAME is "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 actual ClientWindow instance.

Parameters
context:FacesContext

the FacesContext for this request.

Returns:boolean

the result as specified above

Annotations
@Override