org.apache.myfaces.shared.config
Class MyfacesConfig

java.lang.Object
  extended by org.apache.myfaces.shared.config.MyfacesConfig

public class MyfacesConfig
extends Object

Holds all configuration init parameters (from web.xml) that are independent from the core implementation. The parameters in this class are available to all shared, component and implementation classes. See RuntimeConfig for configuration infos that come from the faces-config files and are needed by the core implementation. MyfacesConfig is meant for components that implement some of the extended features of MyFaces. Anyhow, using the MyFaces JSF implementation is no precondition for using MyfacesConfig in custom components. Upon using another JSF implementation (or omitting the extended init parameters) all config properties will simply have their default values.

Version:
$Revision: 1357499 $ $Date: 2012-07-05 03:55:28 -0500 (Thu, 05 Jul 2012) $
Author:
Manfred Geiler (latest modification by $Author: lu4242 $)

Field Summary
static String INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE
          Set the size of the cache used to store strings generated using SectionUniqueIdCounter for component ids.
static int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT
           
static String INIT_PARAM_CONFIG_REFRESH_PERIOD
          Set the time in seconds that check for updates of web.xml and faces-config descriptors and refresh the configuration.
static long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
           
static String INIT_PARAM_DEBUG_PHASE_LISTENER
          Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value).
static boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT
           
static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE
          Define the default content type that the default ResponseWriter generates, when no match can be derived from HTTP Accept Header.
static String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT
           
static String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES
          When the application runs inside Google Application Engine container (GAE), indicate which jar files should be scanned for annotations.
static String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT
           
static String INIT_PARAM_GAE_JSF_JAR_FILES
          When the application runs inside Google Application Engine container (GAE), indicate which jar files should be scanned for files (faces-config, facelets taglib or annotations).
static String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT
           
static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS
          Indicate if the facelet associated to the view should be reapplied when the view is refreshed.
static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT
           
static String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE
          Enable or disable a special mode that enable full state for parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression.
static boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT
           
static String INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE
          If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions
static boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT
           
static String INIT_PARAM_RESOURCE_VIRTUAL_PATH
          Set the virtual path used to serve resources using tomahawk addResource API.
static String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
           
static String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER
          Change default getType() behavior for composite component EL resolver, from return null (see JSF 2_0 spec section 5_6_2_2) to use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the right type when a getType() is called over the source EL expression.
static boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT
           
static String INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX
          Detect if a target (usually head) should be update for the current view in an ajax render operation.
static boolean INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT
           
static String INIT_PARAM_SUPPORT_JSP_AND_FACES_EL
          If set false, myfaces won't support JSP and javax.faces.el.
static boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT
           
static String INIT_PARAM_VALIDATE_XML
          If set to true, tag library XML files and faces config XML files using schema will be validated during application start up
static boolean INIT_PARAM_VALIDATE_XML_DEFAULT
           
static String INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED
          Enable or disable a cache used to "remember" the generated facelets unique ids and reduce the impact on memory usage, only active if javax.faces.FACELETS_REFRESH_PERIOD is -1 (no refresh).
static boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT
           
static String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG
          Wrap content inside script with xml comment to prevent old browsers to display it.
static boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT
           
 
Constructor Summary
MyfacesConfig()
           
 
Method Summary
 String getAddResourceClass()
           
static String getAddResourceClassFromServletContext(javax.servlet.ServletContext servletContext)
          ExtensionFilter needs access to AddResourceClass init param without having an ExternalContext at hand.
 int getComponentUniqueIdsCacheSize()
           
 long getConfigRefreshPeriod()
           
static MyfacesConfig getCurrentInstance(ExternalContext extCtx)
           
 String getDefaultResponseWriterContentTypeMode()
           
 String getDelegateFacesServlet()
           
 String getGaeJsfAnnotationsJarFiles()
           
 String getGaeJsfJarFiles()
           
 String getResourceVirtualPath()
           
 boolean isAllowJavascript()
          Do not use this in renderers directly! You should use JavascriptUtils.isJavascriptAllowed(javax.faces.context.ExternalContext) to determine if javascript is allowed or not.
 boolean isAutoScroll()
           
 boolean isCheckExtensionsFilter()
          Should the environment be checked so that the ExtensionsFilter will work properly.
 boolean isDebugPhaseListenerEnabled()
           
 boolean isDetectJavascript()
           
 boolean isMyfacesImplAvailable()
           
 boolean isPrettyHtml()
           
 boolean isReadonlyAsDisabledForSelect()
           
 boolean isRefreshTransientBuildOnPSS()
           
 boolean isRefreshTransientBuildOnPSSAuto()
           
 boolean isRefreshTransientBuildOnPSSPreserveState()
           
 boolean isRenderClearJavascriptOnButton()
          This param renders the clear javascript on button necessary only for compatibility with hidden fields feature of myfaces.
 boolean isRenderFormSubmitScriptInline()
           
 boolean isRenderHiddenFieldsForLinkParams()
           
 boolean isRenderViewStateId()
          JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name" and the "id" attribute of the hidden input that is rendered for the purpose of state saving (see ResponseStateManager.VIEW_STATE_PARAM).
 boolean isRiImplAvailable()
           
 boolean isSaveFormSubmitLinkIE()
          Add a code that save the form when submit a form using a link.
 boolean isStrictJsf2CCELResolver()
           
 boolean isStrictJsf2RefreshTargetAjax()
           
 boolean isStrictXhtmlLinks()
          W3C recommends to use the "&" entity instead of a plain "&" character within HTML.
 boolean isSupportJSPAndFacesEL()
           
 boolean isTomahawkAvailable()
           
 boolean isValidateXML()
           
 boolean isViewStateJavascript()
           
 boolean isViewUniqueIdsCacheEnabled()
           
 boolean isWrapScriptContentWithXmlCommentTag()
           
 void setCheckExtensionsFilter(boolean extensionsFilter)
           
 void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)
           
 void setConfigRefreshPeriod(long configRefreshPeriod)
           
 void setDebugPhaseListenerEnabled(boolean debugPhaseListener)
           
 void setDefaultResponseWriterContentTypeMode(String defaultResponseWriterContentTypeMode)
           
 void setDelegateFacesServlet(String delegateFacesServlet)
           
 void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)
           
 void setGaeJsfJarFiles(String gaeJsfJarFiles)
           
 void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)
           
 void setRefreshTransientBuildOnPSSAuto(boolean refreshTransientBuildOnPSSAuto)
           
 void setRefreshTransientBuildOnPSSPreserveState(boolean refreshTransientBuildOnPSSPreserveState)
           
 void setRenderClearJavascriptOnButton(boolean renderClearJavascriptOnButton)
           
 void setRenderFormSubmitScriptInline(boolean renderFormSubmitScriptInline)
           
 void setRenderHiddenFieldsForLinkParams(boolean renderHiddenFieldsForLinkParams)
           
 void setRenderViewStateId(boolean renderViewStateId)
           
 void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)
           
 void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)
           
 void setStrictJsf2RefreshTargetAjax(boolean strictJsf2RefreshTargetAjax)
           
 void setStrictXhtmlLinks(boolean strictXhtmlLinks)
           
 void setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL)
           
 void setValidateXML(boolean validateXML)
           
 void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)
           
 void setWrapScriptContentWithXmlCommentTag(boolean wrapScriptContentWithXmlCommentTag)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INIT_PARAM_RESOURCE_VIRTUAL_PATH

@JSFWebConfigParam(tags="tomahawk")
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH
Set the virtual path used to serve resources using tomahawk addResource API. Note ExtensionsFilter should be able to receive request on the prefix used here.

See Also:
Constant Field Values

INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT

public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_CONFIG_REFRESH_PERIOD

@JSFWebConfigParam(defaultValue="2",
                   since="1.1",
                   classType="java.lang.Long")
public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD
Set the time in seconds that check for updates of web.xml and faces-config descriptors and refresh the configuration. This param is valid only if project stage is not production. Set this param to 0 disable this feature.

See Also:
Constant Field Values

INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT

public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS

@JSFWebConfigParam(since="2.0",
                   defaultValue="auto",
                   expectedValues="true,false,auto",
                   tags="performance",
                   ignoreUpperLowerCase=true,
                   group="state")
public static final String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS
Indicate if the facelet associated to the view should be reapplied when the view is refreshed. Default mode is "auto".

This param is only valid when partial state saving is on. If this is set as true, the tag-handlers are always reapplied before render view, like in facelets 1.1.x, allowing c:if work correctly to "toggle" components based on a value changed on invoke application phase. If the param is set as "auto", the implementation check if c:if, c:forEach, c:choose and ui:include with src=ELExpression is used on the page and if that so, mark the view to be refreshed.

See Also:
Constant Field Values

INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT

public static final String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE

@JSFWebConfigParam(since="2.0",
                   defaultValue="false",
                   expectedValues="true, false, on, off, yes, no",
                   tags="performance",
                   ignoreUpperLowerCase=true,
                   group="state")
public static final String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE
Enable or disable a special mode that enable full state for parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression. By default is disabled(false).

This param is only valid when partial state saving is on. If this is set as true, parent components containing c:if, c:forEach, c:choose and ui:include with src=ELExpression are marked to be restored fully, so state is preserved between request.

See Also:
Constant Field Values

INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT

public static final boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_VALIDATE_XML

@JSFWebConfigParam(since="2.0",
                   expectedValues="true, false, on, off, yes, no",
                   ignoreUpperLowerCase=true)
public static final String INIT_PARAM_VALIDATE_XML
If set to true, tag library XML files and faces config XML files using schema will be validated during application start up

See Also:
Constant Field Values

INIT_PARAM_VALIDATE_XML_DEFAULT

public static final boolean INIT_PARAM_VALIDATE_XML_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG

@JSFWebConfigParam(since="2.0.1",
                   expectedValues="true, false, on, off, yes, no",
                   defaultValue="true",
                   ignoreUpperLowerCase=true,
                   group="render")
public static final String INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG
Wrap content inside script with xml comment to prevent old browsers to display it. By default it is true.

See Also:
Constant Field Values

INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT

public static final boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE

@JSFWebConfigParam(since="2.0.2",
                   expectedValues="true, false, on, off, yes, no",
                   defaultValue="false",
                   ignoreUpperLowerCase=true,
                   group="render")
public static final String INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE
If set true, render the form submit script inline, as in myfaces core 1.2 and earlier versions

See Also:
Constant Field Values

INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT

public static final boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_DEBUG_PHASE_LISTENER

@JSFWebConfigParam(since="2.0.8")
public static final String INIT_PARAM_DEBUG_PHASE_LISTENER
Enable/disable DebugPhaseListener feature, with provide useful information about ValueHolder variables (submittedValue, localValue, value). Note evaluate those getters for each component could cause some unwanted side effects when using "access" type scopes like on MyFaces CODI. This param only has effect when project stage is Development.

See Also:
Constant Field Values

INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT

public static final boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX

@JSFWebConfigParam(since="2.0.10",
                   expectedValues="true, false",
                   defaultValue="false")
public static final String INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX
Detect if a target (usually head) should be update for the current view in an ajax render operation. This is activated if a css or js resource is added dynamically by effect of a refresh (c:if, ui:include src="#{...}" or a manipulation of the tree). This ensures ajax updates of content using ui:include will be consistent. Note this behavior is a myfaces specific extension, so to ensure strict compatibility with the spec, set this param to false (default false).

See Also:
Constant Field Values

INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT

public static final boolean INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER

@JSFWebConfigParam(since="2.0.10",
                   expectedValues="true, false",
                   defaultValue="false",
                   group="EL")
public static final String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER
Change default getType() behavior for composite component EL resolver, from return null (see JSF 2_0 spec section 5_6_2_2) to use the metadata information added by composite:attribute, ensuring components working with chained EL expressions to find the right type when a getType() is called over the source EL expression. To ensure strict compatibility with the spec set this param to true (by default is false, so the change is enabled by default).

See Also:
Constant Field Values

INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT

public static final boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE

@JSFWebConfigParam(since="2.0.11,2.1.5",
                   expectedValues="text/html, application/xhtml+xml",
                   defaultValue="text/html",
                   group="render")
public static final String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE
Define the default content type that the default ResponseWriter generates, when no match can be derived from HTTP Accept Header.

See Also:
Constant Field Values

INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT

public static final String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED

@JSFWebConfigParam(defaultValue="false",
                   since="2.0.13, 2.1.7",
                   expectedValues="true, false",
                   group="viewhandler",
                   tags="performance",
                   desc="Enable or disable a cache used to \'remember\'  the generated facelets unique ids and reduce the impact over memory usage.")
public static final String INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED
Enable or disable a cache used to "remember" the generated facelets unique ids and reduce the impact on memory usage, only active if javax.faces.FACELETS_REFRESH_PERIOD is -1 (no refresh).

See Also:
Constant Field Values

INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT

public static final boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE

@JSFWebConfigParam(defaultValue="100",
                   since="2.0.13, 2.1.7",
                   group="viewhandler",
                   tags="performance")
public static final String INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE
Set the size of the cache used to store strings generated using SectionUniqueIdCounter for component ids. If this is set to 0, no cache is used. By default is set to 100.

See Also:
Constant Field Values

INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT

public static final int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_SUPPORT_JSP_AND_FACES_EL

@JSFWebConfigParam(since="2.0.13,2.1.7",
                   expectedValues="true,false",
                   defaultValue="true",
                   desc="If set false, myfaces won\'t support JSP and javax.faces.el. JSP are deprecated in JSF 2.X, javax.faces.el in in JSF 1.2. Default value is true.",
                   group="EL",
                   tags="performance ")
public static final String INIT_PARAM_SUPPORT_JSP_AND_FACES_EL
If set false, myfaces won't support JSP and javax.faces.el. JSP are deprecated in JSF 2.X, javax.faces.el in in JSF 1.2. Default value is true. If this property is set is false, JSF 1.1 VariableResolver and PropertyResolver config (replaced in JSF 1.2 by ELResolver) and all related logic for JSP is skipped, making EL evaluation faster.

See Also:
Constant Field Values

INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT

public static final boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT
See Also:
Constant Field Values

INIT_PARAM_GAE_JSF_JAR_FILES

@JSFWebConfigParam(since="2.1.8, 2.0.14",
                   expectedValues="none, myfavoritejsflib-*.jar",
                   tags="performance, GAE")
public static final String INIT_PARAM_GAE_JSF_JAR_FILES
When the application runs inside Google Application Engine container (GAE), indicate which jar files should be scanned for files (faces-config, facelets taglib or annotations). It accept simple wildcard patterns like myfavoritejsflib-*.jar or myfavoritejsflib-1.1.?.jar. By default, all the classpath is scanned for files annotations (so it adds an small delay on startup).

See Also:
Constant Field Values

INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT

public static final String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT

INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES

@JSFWebConfigParam(since="2.1.8, 2.0.14",
                   expectedValues="none, myfavoritejsflib-*.jar",
                   tags="performance, GAE")
public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES
When the application runs inside Google Application Engine container (GAE), indicate which jar files should be scanned for annotations. This param overrides org.apache.myfaces.GAE_JSF_JAR_FILES behavior that tries to find faces-config.xml or files ending with .faces-config.xml in /META-INF folder and if that so, try to find JSF annotations in the whole jar file. It accept simple wildcard patterns like myfavoritejsflib-*.jar or myfavoritejsflib-1.1.?.jar. By default, all the classpath is scanned for annotations (so it adds an small delay on startup).

See Also:
Constant Field Values

INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT

public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT
Constructor Detail

MyfacesConfig

public MyfacesConfig()
Method Detail

getCurrentInstance

public static MyfacesConfig getCurrentInstance(ExternalContext extCtx)

getResourceVirtualPath

public String getResourceVirtualPath()

isPrettyHtml

public boolean isPrettyHtml()

isDetectJavascript

public boolean isDetectJavascript()

isReadonlyAsDisabledForSelect

public boolean isReadonlyAsDisabledForSelect()

getConfigRefreshPeriod

public long getConfigRefreshPeriod()

setConfigRefreshPeriod

public void setConfigRefreshPeriod(long configRefreshPeriod)

isRenderViewStateId

public boolean isRenderViewStateId()
JSF API 1.2 defines a "javax.faces.ViewState" client parameter, that must be rendered as both the "name" and the "id" attribute of the hidden input that is rendered for the purpose of state saving (see ResponseStateManager.VIEW_STATE_PARAM). Actually this causes duplicate id attributes and thus invalid XHTML pages when multiple forms are rendered on one page. With the INIT_PARAM_RENDER_VIEWSTATE_ID context parameter you can tune this behaviour.
Set it to Default value is: true (for backwards compatibility and JSF 1.2 compliancy)

Returns:
true, if the client state hidden input "javax.faces.ViewState" id attribute should be rendered

setRenderViewStateId

public void setRenderViewStateId(boolean renderViewStateId)

isStrictXhtmlLinks

public boolean isStrictXhtmlLinks()

W3C recommends to use the "&amp;" entity instead of a plain "&" character within HTML. This also applies to attribute values and thus to the "href" attribute of <a> elements as well. Even more, when XHTML is used as output the usage of plain "&" characters is forbidden and would lead to invalid XML code. Therefore, since version 1.1.6 MyFaces renders the correct "&amp;" entity for links.

The init parameter INIT_PARAM_STRICT_XHTML_LINKS makes it possible to restore the old behaviour and to make MyFaces "bug compatible" to the Sun RI which renders plain "&" chars in links as well.

Returns:
true if ampersand characters ("&") should be correctly rendered as "&amp;" entities within link urls (=default), false for old (XHTML incompatible) behaviour
See Also:
HTML 4.01 Specification, Jira: MYFACES-1774

setStrictXhtmlLinks

public void setStrictXhtmlLinks(boolean strictXhtmlLinks)

isTomahawkAvailable

public boolean isTomahawkAvailable()

isMyfacesImplAvailable

public boolean isMyfacesImplAvailable()

isRiImplAvailable

public boolean isRiImplAvailable()

isAllowJavascript

public boolean isAllowJavascript()
Do not use this in renderers directly! You should use JavascriptUtils.isJavascriptAllowed(javax.faces.context.ExternalContext) to determine if javascript is allowed or not.


isAutoScroll

public boolean isAutoScroll()

getAddResourceClass

public String getAddResourceClass()

getAddResourceClassFromServletContext

public static String getAddResourceClassFromServletContext(javax.servlet.ServletContext servletContext)
ExtensionFilter needs access to AddResourceClass init param without having an ExternalContext at hand.


isCheckExtensionsFilter

public boolean isCheckExtensionsFilter()
Should the environment be checked so that the ExtensionsFilter will work properly.


setCheckExtensionsFilter

public void setCheckExtensionsFilter(boolean extensionsFilter)

isViewStateJavascript

public boolean isViewStateJavascript()

setRenderClearJavascriptOnButton

public void setRenderClearJavascriptOnButton(boolean renderClearJavascriptOnButton)

isRenderClearJavascriptOnButton

public boolean isRenderClearJavascriptOnButton()
This param renders the clear javascript on button necessary only for compatibility with hidden fields feature of myfaces. This is done because jsf ri does not render javascript on onclick method for button, so myfaces should do this.

Returns:

isRenderHiddenFieldsForLinkParams

public boolean isRenderHiddenFieldsForLinkParams()

setRenderHiddenFieldsForLinkParams

public void setRenderHiddenFieldsForLinkParams(boolean renderHiddenFieldsForLinkParams)

setSaveFormSubmitLinkIE

public void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)

isSaveFormSubmitLinkIE

public boolean isSaveFormSubmitLinkIE()
Add a code that save the form when submit a form using a link. It's a bug on IE.

Returns:

getDelegateFacesServlet

public String getDelegateFacesServlet()

setDelegateFacesServlet

public void setDelegateFacesServlet(String delegateFacesServlet)

isRefreshTransientBuildOnPSS

public boolean isRefreshTransientBuildOnPSS()

setRefreshTransientBuildOnPSS

public void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)

isRefreshTransientBuildOnPSSAuto

public boolean isRefreshTransientBuildOnPSSAuto()

setRefreshTransientBuildOnPSSAuto

public void setRefreshTransientBuildOnPSSAuto(boolean refreshTransientBuildOnPSSAuto)

isRefreshTransientBuildOnPSSPreserveState

public boolean isRefreshTransientBuildOnPSSPreserveState()

setRefreshTransientBuildOnPSSPreserveState

public void setRefreshTransientBuildOnPSSPreserveState(boolean refreshTransientBuildOnPSSPreserveState)

isValidateXML

public boolean isValidateXML()

setValidateXML

public void setValidateXML(boolean validateXML)

isWrapScriptContentWithXmlCommentTag

public boolean isWrapScriptContentWithXmlCommentTag()

setWrapScriptContentWithXmlCommentTag

public void setWrapScriptContentWithXmlCommentTag(boolean wrapScriptContentWithXmlCommentTag)

isRenderFormSubmitScriptInline

public boolean isRenderFormSubmitScriptInline()

setRenderFormSubmitScriptInline

public void setRenderFormSubmitScriptInline(boolean renderFormSubmitScriptInline)

isDebugPhaseListenerEnabled

public boolean isDebugPhaseListenerEnabled()

setDebugPhaseListenerEnabled

public void setDebugPhaseListenerEnabled(boolean debugPhaseListener)

isStrictJsf2RefreshTargetAjax

public boolean isStrictJsf2RefreshTargetAjax()

setStrictJsf2RefreshTargetAjax

public void setStrictJsf2RefreshTargetAjax(boolean strictJsf2RefreshTargetAjax)

isStrictJsf2CCELResolver

public boolean isStrictJsf2CCELResolver()

setStrictJsf2CCELResolver

public void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)

getDefaultResponseWriterContentTypeMode

public String getDefaultResponseWriterContentTypeMode()

setDefaultResponseWriterContentTypeMode

public void setDefaultResponseWriterContentTypeMode(String defaultResponseWriterContentTypeMode)

isViewUniqueIdsCacheEnabled

public boolean isViewUniqueIdsCacheEnabled()

setViewUniqueIdsCacheEnabled

public void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)

isSupportJSPAndFacesEL

public boolean isSupportJSPAndFacesEL()

setSupportJSPAndFacesEL

public void setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL)

getComponentUniqueIdsCacheSize

public int getComponentUniqueIdsCacheSize()

setComponentUniqueIdsCacheSize

public void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)

getGaeJsfJarFiles

public String getGaeJsfJarFiles()

setGaeJsfJarFiles

public void setGaeJsfJarFiles(String gaeJsfJarFiles)

getGaeJsfAnnotationsJarFiles

public String getGaeJsfAnnotationsJarFiles()

setGaeJsfAnnotationsJarFiles

public void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.