+

Search Tips   |   Advanced Search

Java Server Faces custom properties


Configure name-value pairs of data, where the name is a property key and the value is a string value that we can use to set internal system configuration properties. Defining a new property enables you to configure a setting beyond what is available in the admin console.

The following is a list of the available Java Server Faces custom properties.

com.ibm.ws.jsf.disableStylePassthroughForCheckboxList

This custom property prevents passing the style information into the items in the check box list. This property defaults to false to maintain the current behavior. Define and set the com.ibm.ws.jsf.disableStylePassthroughForCheckboxList context parameter to true in web.xml prevent passing style information into items in the check box list. Use the following code as an example.

 

Example

<context-param>
<description> Set to true if style information should not be passed into items of check box list
</description>
<param-name>com.ibm.ws.jsf.disableStylePassthroughForCheckboxList</param-name>
<param-value>true</param-value>
</context-param>

com.ibm.ws.jsf.associateLabelWithId

The com.ibm.ws.jsf.associateLabelWithId custom property changes the rendering behavior for both the <h:selectOneRadio> and <h:selectManyCheckbox> components. The label no longer wraps the input element. Instead, each input element has a unique ID and the label is associated with that ID used for that attribute. Define and set the com.ibm.ws.jsf.associateLabelWithId context parameter to true in web.xml. Use the following code as an example.

 

Example

<context-param>
<description> Set to true to explicitly associate labels with their input elements for select one radio buttons  and select many check box lists.
</description>
<param-name>com.ibm.ws.jsf.associateLabelWithId</param-name>
<param-value>true</param-value>
</context-param>

enableRestoreView11Compatibility

Because JSF 1.2 is supported, a JSF 1.2 application, might create the ViewExpiredException exception under load. If the view is not found in session, we can use a compatibility mode in JSF to create a new view. This can have adverse behaviors because it is a new view, and items that are usually in the view, such as state, are no longer be there. Use the following code as an example to add the com.sun.faces.enableRestoreView11Compatibility context parameter to true in web.xml.

 

Example

<context-param>
   <param-name>com.sun.faces.enableRestoreView11Compatibility</param-name>
   <param-value>true</param-value>
</context-param>

com.ibm.ws.jsf.loadExternalDtd

When parsing the faces-config.xml file from included libraries, the Faces configuration parser attempts to load the DTD even when validation is disabled. The Faces configuration parser uses a SAXParser to read the faces-config.xml. The default behavior of the SAXParser parser is to always load the DTD even if validation is disabled. This behavior can lead to errors initializing the Faces Servlet on systems isolated from the internet.

In web.xml, set the com.ibm.ws.jsf.loadExternalDtd context paramater to false to have the Faces configuration parser set the "http://apache.org/xml/features/nonvalidating/load-external-dtd" feature to false.

 

Example

<context-param>
<description> When set to false, this property sets a feature on the SAX parser to prevent loading the external DTD.
</description>
<param-name>com.ibm.ws.jsf.loadExternalDtd</param-name>
<param-value>false</param-value>
</context-param>




 

Related tasks


Set Java Server Faces implementation

 

Related


JSF engine configuration parameters
Web container custom properties