public class MyfacesConfig extends Object
| Modifier and Type | Field and Description | 
|---|---|
| static String | INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZESet 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_PERIODSet 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_LISTENEREnable/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_MODEDefine 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_FILESWhen 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_FILESWhen 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_PSSIndicate 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_STATEEnable 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_INLINEIf 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_PATHSet 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_RESOLVERChange 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_AJAXDetect 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_STRICT_JSF_2_VIEW_NOT_FOUNDIf this param is set to true, a check will be done in Restore View Phase to check
 if the viewId exists or not and if it does not exists, a 404 response will be thrown. | 
| static boolean | INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT | 
| static String | INIT_PARAM_SUPPORT_JSP_AND_FACES_ELIf 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_XMLIf 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_ENABLEDEnable 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_TAGWrap 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 and Description | 
|---|
| MyfacesConfig() | 
| Modifier and Type | Method and Description | 
|---|---|
| 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 | isStrictJsf2ViewNotFound() | 
| 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 | setStrictJsf2ViewNotFound(boolean strictJsf2ViewNotFound) | 
| void | setStrictXhtmlLinks(boolean strictXhtmlLinks) | 
| void | setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL) | 
| void | setValidateXML(boolean validateXML) | 
| void | setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled) | 
| void | setWrapScriptContentWithXmlCommentTag(boolean wrapScriptContentWithXmlCommentTag) | 
@JSFWebConfigParam(tags="tomahawk") public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
@JSFWebConfigParam(defaultValue="2",
                   since="1.1",
                   classType="java.lang.Long")
public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD
public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
@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
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.
public static final String INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_DEFAULT
@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
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.
public static final boolean INIT_PARAM_REFRESH_TRANSIENT_BUILD_ON_PSS_PRESERVE_STATE_DEFAULT
@JSFWebConfigParam(since="2.0",
                   expectedValues="true, false, on, off, yes, no",
                   ignoreUpperLowerCase=true)
public static final String INIT_PARAM_VALIDATE_XML
true, tag library XML files and faces config XML files using schema 
 will be validated during application start uppublic static final boolean INIT_PARAM_VALIDATE_XML_DEFAULT
@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
public static final boolean INIT_PARAM_WRAP_SCRIPT_CONTENT_WITH_XML_COMMENT_TAG_DEFAULT
@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
public static final boolean INIT_PARAM_RENDER_FORM_SUBMIT_SCRIPT_INLINE_DEFAULT
@JSFWebConfigParam(since="2.0.8") public static final String INIT_PARAM_DEBUG_PHASE_LISTENER
public static final boolean INIT_PARAM_DEBUG_PHASE_LISTENER_DEFAULT
@JSFWebConfigParam(since="2.0.10",
                   expectedValues="true, false",
                   defaultValue="false")
public static final String INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX
public static final boolean INIT_PARAM_STRICT_JSF_2_REFRESH_TARGET_AJAX_DEFAULT
@JSFWebConfigParam(since="2.0.10",
                   expectedValues="true, false",
                   defaultValue="false",
                   group="EL")
public static final String INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER
public static final boolean INIT_PARAM_STRICT_JSF_2_CC_EL_RESOLVER_DEFAULT
@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
public static final String INIT_PARAM_DEFAULT_RESPONSE_WRITER_CONTENT_TYPE_MODE_DEFAULT
@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
public static final boolean INIT_PARAM_VIEW_UNIQUE_IDS_CACHE_ENABLED_DEFAULT
@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
public static final int INIT_PARAM_COMPONENT_UNIQUE_IDS_CACHE_SIZE_DEFAULT
@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
public static final boolean INIT_PARAM_SUPPORT_JSP_AND_FACES_EL_DEFAULT
@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
public static final String INIT_PARAM_GAE_JSF_JAR_FILES_DEFAULT
@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
public static final String INIT_PARAM_GAE_JSF_ANNOTATIONS_JAR_FILES_DEFAULT
@JSFWebConfigParam(since="2.1.13",
                   defaultValue="false",
                   expectedValues="true,false",
                   group="viewhandler")
public static final String INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND
public static final boolean INIT_PARAM_STRICT_JSF_2_VIEW_NOT_FOUND_DEFAULT
public static MyfacesConfig getCurrentInstance(ExternalContext extCtx)
public String getResourceVirtualPath()
public boolean isPrettyHtml()
public boolean isDetectJavascript()
public boolean isReadonlyAsDisabledForSelect()
public long getConfigRefreshPeriod()
public void setConfigRefreshPeriod(long configRefreshPeriod)
public boolean isRenderViewStateId()
INIT_PARAM_RENDER_VIEWSTATE_ID context parameter you can tune this behaviour.
 public void setRenderViewStateId(boolean renderViewStateId)
public boolean isStrictXhtmlLinks()
W3C recommends to use the "&" 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 "&" 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.
public void setStrictXhtmlLinks(boolean strictXhtmlLinks)
public boolean isTomahawkAvailable()
public boolean isMyfacesImplAvailable()
public boolean isRiImplAvailable()
public boolean isAllowJavascript()
JavascriptUtils.isJavascriptAllowed(javax.faces.context.ExternalContext)
 to determine if javascript is allowed or not.public boolean isAutoScroll()
public String getAddResourceClass()
public static String getAddResourceClassFromServletContext(javax.servlet.ServletContext servletContext)
public boolean isCheckExtensionsFilter()
public void setCheckExtensionsFilter(boolean extensionsFilter)
public boolean isViewStateJavascript()
public void setRenderClearJavascriptOnButton(boolean renderClearJavascriptOnButton)
public boolean isRenderClearJavascriptOnButton()
public boolean isRenderHiddenFieldsForLinkParams()
public void setRenderHiddenFieldsForLinkParams(boolean renderHiddenFieldsForLinkParams)
public void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)
public boolean isSaveFormSubmitLinkIE()
public String getDelegateFacesServlet()
public void setDelegateFacesServlet(String delegateFacesServlet)
public boolean isRefreshTransientBuildOnPSS()
public void setRefreshTransientBuildOnPSS(boolean refreshTransientBuildOnPSS)
public boolean isRefreshTransientBuildOnPSSAuto()
public void setRefreshTransientBuildOnPSSAuto(boolean refreshTransientBuildOnPSSAuto)
public boolean isRefreshTransientBuildOnPSSPreserveState()
public void setRefreshTransientBuildOnPSSPreserveState(boolean refreshTransientBuildOnPSSPreserveState)
public boolean isValidateXML()
public void setValidateXML(boolean validateXML)
public boolean isWrapScriptContentWithXmlCommentTag()
public void setWrapScriptContentWithXmlCommentTag(boolean wrapScriptContentWithXmlCommentTag)
public boolean isRenderFormSubmitScriptInline()
public void setRenderFormSubmitScriptInline(boolean renderFormSubmitScriptInline)
public boolean isDebugPhaseListenerEnabled()
public void setDebugPhaseListenerEnabled(boolean debugPhaseListener)
public boolean isStrictJsf2RefreshTargetAjax()
public void setStrictJsf2RefreshTargetAjax(boolean strictJsf2RefreshTargetAjax)
public boolean isStrictJsf2CCELResolver()
public void setStrictJsf2CCELResolver(boolean strictJsf2CCELResolver)
public String getDefaultResponseWriterContentTypeMode()
public void setDefaultResponseWriterContentTypeMode(String defaultResponseWriterContentTypeMode)
public boolean isViewUniqueIdsCacheEnabled()
public void setViewUniqueIdsCacheEnabled(boolean viewUniqueIdsCacheEnabled)
public boolean isSupportJSPAndFacesEL()
public void setSupportJSPAndFacesEL(boolean supportJSPANDFacesEL)
public int getComponentUniqueIdsCacheSize()
public void setComponentUniqueIdsCacheSize(int componentUniqueIdsCacheSize)
public String getGaeJsfJarFiles()
public void setGaeJsfJarFiles(String gaeJsfJarFiles)
public String getGaeJsfAnnotationsJarFiles()
public void setGaeJsfAnnotationsJarFiles(String gaeJsfAnnotationsJarFiles)
public boolean isStrictJsf2ViewNotFound()
public void setStrictJsf2ViewNotFound(boolean strictJsf2ViewNotFound)
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.