@SessionScoped public class DefaultClientWindowConfig extends Object implements ClientWindowConfig
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#LAZY unless
we detect a bot. |
String |
getClientWindowResourceLocation()
Overwrite this to define your own ClientWindow handler html location.
|
int |
getMaxWindowContextCount()
Restricts the number of active windows.
|
String |
getUserAgent(javax.faces.context.FacesContext facesContext)
This information will get stored as it cannot
change during the session anyway.
|
protected void |
init() |
boolean |
isJavaScriptEnabled() |
void |
setJavaScriptEnabled(boolean javaScriptEnabled) |
public static final String COOKIE_NAME_NOSCRIPT_ENABLED
@PostConstruct protected void init()
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#LAZY unless
we detect a bot. Use JsfModuleConfig.getDefaultWindowMode()
to change this default behavior. Alternative:
Override this method to exclude other requests from getting accessed.getClientWindowRenderMode in interface ClientWindowConfigpublic String getClientWindowHtml()
getClientWindowHtml in interface ClientWindowConfigpublic String getUserAgent(javax.faces.context.FacesContext facesContext)
public String getClientWindowResourceLocation()
public int getMaxWindowContextCount()
ClientWindowConfiggetMaxWindowContextCount in interface ClientWindowConfigCopyright © 2015 The Apache Software Foundation. All rights reserved.