|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.shared_impl.config.MyfacesConfig
public class MyfacesConfig
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.
Field Summary | |
---|---|
static java.lang.String |
INIT_PARAM_CONFIG_REFRESH_PERIOD
|
static long |
INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
|
static java.lang.String |
INIT_PARAM_RESOURCE_VIRTUAL_PATH
|
static java.lang.String |
INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
|
Constructor Summary | |
---|---|
MyfacesConfig()
|
Method Summary | |
---|---|
java.lang.String |
getAddResourceClass()
|
static java.lang.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)
|
java.lang.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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INIT_PARAM_RESOURCE_VIRTUAL_PATH
public static final java.lang.String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
public static final java.lang.String INIT_PARAM_CONFIG_REFRESH_PERIOD
public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
Constructor Detail |
---|
public MyfacesConfig()
Method Detail |
---|
public static MyfacesConfig getCurrentInstance(javax.faces.context.ExternalContext extCtx)
public java.lang.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 java.lang.String getAddResourceClass()
public static java.lang.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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |