public class MyfacesConfig extends Object
Modifier and Type | Field and Description |
---|---|
static String |
INIT_PARAM_CONFIG_REFRESH_PERIOD |
static long |
INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT |
static String |
INIT_PARAM_RESOURCE_VIRTUAL_PATH |
static String |
INIT_PARAM_RESOURCE_VIRTUAL_PATH_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.
|
long |
getConfigRefreshPeriod() |
static MyfacesConfig |
getCurrentInstance(javax.faces.context.ExternalContext extCtx) |
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 |
isDetectJavascript() |
boolean |
isMyfacesImplAvailable() |
boolean |
isPrettyHtml() |
boolean |
isReadonlyAsDisabledForSelect() |
boolean |
isRenderClearJavascriptOnButton()
This param renders the clear javascript on button necessary only for
compatibility with hidden fields feature of myfaces.
|
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 API).
|
boolean |
isRiImplAvailable() |
boolean |
isSaveFormSubmitLinkIE()
Add a code that save the form when submit a form using a
link.
|
boolean |
isStrictXhtmlLinks()
W3C recommends to use the "&" entity instead of a plain "&" character within HTML.
|
boolean |
isTomahawkAvailable() |
boolean |
isViewStateJavascript() |
void |
setCheckExtensionsFilter(boolean extensionsFilter) |
void |
setConfigRefreshPeriod(long configRefreshPeriod) |
void |
setRenderClearJavascriptOnButton(boolean renderClearJavascriptOnButton) |
void |
setRenderViewStateId(boolean renderViewStateId) |
void |
setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE) |
void |
setStrictXhtmlLinks(boolean strictXhtmlLinks) |
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
public static final String INIT_PARAM_CONFIG_REFRESH_PERIOD
public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
public static MyfacesConfig getCurrentInstance(javax.faces.context.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 void setSaveFormSubmitLinkIE(boolean saveFormSubmitLinkIE)
public boolean isSaveFormSubmitLinkIE()
Copyright © 2013 Apache Software Foundation. All Rights Reserved.