@SessionScoped public class DefaultClientWindowConfig extends Object implements ClientWindowConfig, Serializable
Default implementation of ClientWindowConfig.
By default it will use the internal windowhandler.html
You can @Specializes this class to tweak the configuration or provide a completely new implementation as @Alternative.
ClientWindowConfig.ClientWindowRenderMode| Modifier and Type | Field and Description |
|---|---|
static String |
COOKIE_NAME_NOSCRIPT_ENABLED
We will set a cookie with this very name if a noscript link got clicked by the user
|
| Constructor and Description |
|---|
DefaultClientWindowConfig() |
| Modifier and Type | Method and Description |
|---|---|
String |
getClientWindowHtml() |
ClientWindowConfig.ClientWindowRenderMode |
getClientWindowRenderMode(javax.faces.context.FacesContext facesContext)
By default we use
ClientWindowRenderMode#CLIENTWINDOW unless
we detect a bot. |
String |
getClientWindowResourceLocation()
Overwrite this to define your own ClientWindow handler html location.
|
String |
getUserAgent(javax.faces.context.FacesContext facesContext)
This information will get stored as it cannot
change during the session anyway.
|
boolean |
isJavaScriptEnabled() |
void |
setJavaScriptEnabled(boolean javaScriptEnabled) |
public static final String COOKIE_NAME_NOSCRIPT_ENABLED
public boolean isJavaScriptEnabled()
isJavaScriptEnabled in interface ClientWindowConfigpublic void setJavaScriptEnabled(boolean javaScriptEnabled)
setJavaScriptEnabled in interface ClientWindowConfigjavaScriptEnabled - whether JavaScript is enabledpublic ClientWindowConfig.ClientWindowRenderMode getClientWindowRenderMode(javax.faces.context.FacesContext facesContext)
ClientWindowRenderMode#CLIENTWINDOW unless
we detect a bot.
Override this method to exclude other requests from getting accessed.getClientWindowRenderMode in interface ClientWindowConfigfacesContext - public String getClientWindowHtml()
getClientWindowHtml in interface ClientWindowConfigpublic String getUserAgent(javax.faces.context.FacesContext facesContext)
public String getClientWindowResourceLocation()
Copyright © 2011-2013 The Apache Software Foundation. All Rights Reserved.