@SessionScoped public class ClientConfig extends Object implements Serializable
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
|
protected String |
windowHandlerHtml |
Constructor and Description |
---|
ClientConfig() |
Modifier and Type | Method and Description |
---|---|
String |
getUserAgent(javax.faces.context.FacesContext facesContext)
This information will get stored as it cannot
change during the session anyway.
|
String |
getWindowHandlerHtml()
This might return different windowhandlers based on user settings like
his language, an affiliation, etc
|
String |
getWindowHandlerResourceLocation()
For branding the whole windowhandler page - e.g.
|
boolean |
isClientSideWindowHandlerRequest(javax.faces.context.FacesContext facesContext)
Users can overload this method to define in which scenarios a request should result
in an 'intercepted' page with proper windowId detection.
|
boolean |
isJavaScriptEnabled()
Defaults to
true . |
void |
setJavaScriptEnabled(boolean javaScriptEnabled)
Set it to
false if you don't like to use the
JavaScript based client side windowhandler. |
public static final String COOKIE_NAME_NOSCRIPT_ENABLED
protected String windowHandlerHtml
public boolean isJavaScriptEnabled()
true
.public void setJavaScriptEnabled(boolean javaScriptEnabled)
false
if you don't like to use the
JavaScript based client side windowhandler. In this case
the request will be returned directly.javaScriptEnabled
- public String getWindowHandlerResourceLocation()
DEFAULT_WINDOW_HANDLER_HTML_FILE
and adopt it to your needs.
The reason for this is to minimize visual side effects on browsers who do
not properly support html5 localstorage.public String getWindowHandlerHtml() throws IOException
IOException
public String getUserAgent(javax.faces.context.FacesContext facesContext)
public boolean isClientSideWindowHandlerRequest(javax.faces.context.FacesContext facesContext)
true
if the Request should get 'intercepted' and the intermediate
windowhandler.html page should get rendered first. By returning false
the requested page will get rendered intermediately.for determining the UserAgent
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.