public interface FacesConfigXml
This configuration interface parses the /WEB-INF/faces-config.xml
and all
/META-INF/faces-config.xml
files found in the classpath and offers methods to obtain information from
them which is not available by the standard JSF API.
Some examples:
// Get a mapping of all <resource-bundle> vars and base names. Map<String, String> resourceBundles = FacesConfigXml.instance().getResourceBundles();
// Get an ordered list of all <supported-locale> values with <default-locale> as first item. List<Locale> supportedLocales = FacesConfigXml.instance().getSupportedLocales();
Since OmniFaces 3.1, you can if necessary even inject it.
@Inject private FacesConfigXml facesConfigXml;
FacesConfigXmlSingleton
,
FacesConfigXmlProducer
Modifier and Type | Field and Description |
---|---|
static FacesConfigXml |
INSTANCE
Deprecated.
Since 3.1; Use
instance() instead. |
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
getResourceBundles()
Returns a mapping of all resource bundle base names by var.
|
List<Class<? extends ResourceHandler>> |
getResourceHandlers()
Returns an ordered list of all resource handlers registered on this application.
|
List<Locale> |
getSupportedLocales()
Returns an ordered list of all supported locales on this application, with the default locale as the first
item, if any.
|
static FacesConfigXml |
instance()
Returns the lazily loaded enum singleton instance.
|
@Deprecated static final FacesConfigXml INSTANCE
instance()
instead.static FacesConfigXml instance()
Map<String,String> getResourceBundles()
List<Locale> getSupportedLocales()
faces-config.xml
.Application.getDefaultLocale()
,
Application.getSupportedLocales()
List<Class<? extends ResourceHandler>> getResourceHandlers()
faces-config.xml
.Application.getResourceHandler()
Copyright © 2012–2022 OmniFaces. All rights reserved.