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

All Superinterfaces:
Serializable

public interface ClientConfig
extends 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.


Field Summary
static String DEFAULT_WINDOW_HANDLER_HTML_FILE
          The location of the default windowhandler resource
 
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.
 

Field Detail

DEFAULT_WINDOW_HANDLER_HTML_FILE

static final String DEFAULT_WINDOW_HANDLER_HTML_FILE
The location of the default windowhandler resource

See Also:
Constant Field Values
Method Detail

isJavaScriptEnabled

boolean isJavaScriptEnabled()
Defaults to true.

Returns:
if the user has JavaScript enabled

setJavaScriptEnabled

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

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

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 The Apache Software Foundation. All Rights Reserved.