org.apache.myfaces.extensions.cdi.jsf.api.config
Class ClientConfig

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.api.config.ClientConfig
All Implemented Interfaces:
Serializable

@SessionScoped
public class ClientConfig
extends Object
implements Serializable

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.

See Also:
Serialized Form

Field Summary
protected  String windowHandlerHtml
           
 
Constructor Summary
ClientConfig()
           
 
Method Summary
 String getWindowHandlerHtml()
          This might return different windowhandlers based on user settings like his language, an affiliation, etc
 String getWindowHandlerResourceLocation()
          For branding the windowhandler page - e.g. change the backgroundcolour or the language of the message text - you can just copy the content of the DEFAULT_WINDOW_HANDLER_HTML_FILE and adopt it to your needs.
 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

windowHandlerHtml

protected String windowHandlerHtml
Constructor Detail

ClientConfig

public ClientConfig()
Method Detail

isJavaScriptEnabled

public boolean isJavaScriptEnabled()
Defaults to true.

Returns:
if the user has JavaScript enabled

setJavaScriptEnabled

public void setJavaScriptEnabled(boolean javaScriptEnabled)
Set it to false if you don't like to use the JavaScript based client side windowhandler. In this case the request will be returned directly.

Parameters:
javaScriptEnabled -

getWindowHandlerResourceLocation

public String getWindowHandlerResourceLocation()
For branding the windowhandler page - e.g. change the backgroundcolour or the language of the message text - you can just copy the content of the DEFAULT_WINDOW_HANDLER_HTML_FILE and adopt it to your needs.

Returns:
the location of the windowhandler.html resource which should be sent to the users browser.

getWindowHandlerHtml

public String getWindowHandlerHtml()
                            throws IOException
This might return different windowhandlers based on user settings like his language, an affiliation, etc

Returns:
a String containing the whole windowhandler.html file.
Throws:
IOException


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.