Available since OmniFaces 2.1

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 Faces 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.

private FacesConfigXml facesConfigXml;

Feature request

If you know more useful methods/functions which you think should be added to this OmniFaces utility class so that everyone can benefit from a "standard" Faces utility library, feel free to post a feature request.