|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.myfaces.shared_orchestra.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 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 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. |
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 |
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 |
isStrictXhtmlLinks()
W3C recommends to use the "&" entity instead of a plain "&" character within HTML. |
boolean |
isTomahawkAvailable()
|
void |
setCheckExtensionsFilter(boolean extensionsFilter)
|
void |
setConfigRefreshPeriod(long configRefreshPeriod)
|
void |
setRenderViewStateId(boolean renderViewStateId)
|
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 String INIT_PARAM_CONFIG_REFRESH_PERIOD
public static final long INIT_PARAM_CONFIG_REFRESH_PERIOD_DEFAULT
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH
public static final String INIT_PARAM_RESOURCE_VIRTUAL_PATH_DEFAULT
Constructor Detail |
---|
public MyfacesConfig()
Method Detail |
---|
public static MyfacesConfig getCurrentInstance(javax.faces.context.ExternalContext extCtx)
public String getResourceVirtualPath()
public boolean isPrettyHtml()
public boolean isDetectJavascript()
public boolean isReadonlyAsDisabledForSelect()
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 long getConfigRefreshPeriod()
public void setConfigRefreshPeriod(long configRefreshPeriod)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |