|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.lifecycle.ClientConfig
public class ClientConfig
Contains information about whether the user has JavaScript enabled on his client, etc. It also contains the windowhandler html which gets sent to the browser to detect the current windowId. This allows the 'customisation' of this html file to e.g. adopt the background colour to avoid screen flickering. Please note that all subclasses of ClientConfig should also be @SessionScoped as well!
Field Summary | |
---|---|
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 Summary | |
---|---|
ClientConfig()
|
Method Summary | |
---|---|
String |
getUserAgent(FacesContext facesContext)
This information will get stored as it cannot change during the session anyway. |
boolean |
isClientSideWindowHandlerRequest(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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String COOKIE_NAME_NOSCRIPT_ENABLED
protected String windowHandlerHtml
Constructor Detail |
---|
public ClientConfig()
Method Detail |
---|
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 getUserAgent(FacesContext facesContext)
public boolean isClientSideWindowHandlerRequest(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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |