Previous Section  < Day Day Up >  Next Section

D.1 Package javax.faces

FacesException

This class is extended by all other JSF exception classes.

Synopsis

Class name:

javax.faces.FacesException

Extends:

java.lang.RuntimeException

Implements:

java.io.Serializable

Constructors


public FacesException()

Creates an empty instance.


public FacesException(String message)

Creates an instance with the specified message.


public FacesException(String message, Throwable rootCause)

Creates an instance with the specified message and root cause.


public FacesException(Throwable rootCause)

Creates an instance with the specified root cause.

Methods


public Throwable getCause()

Returns the root cause or null if none is set.

FactoryFinder

This class represents the registry for all JSF factory classes: javax.faces.application.ApplicationFactory, javax.faces.context.FacesContextFactory, javax.faces.lifecycle.LifeCycleFactory and javax.faces.render.RenderKitFactory. An application can be configured to use customized versions of all the factory classes, which in turn can create instances of customized versions of the classes they are responsible for.

The FactoryFinder returns instances of factory classes declared in one of these locations, listed in decreasing precedence order:

  1. The factory class declared in the application's WEB-INF/faces-config.xml file.

  2. The factory class declared in the last JSF configuration file declared by the javax.faces.CONFIG_FILE context initialization parameter.

  3. The factory class declared in the JSF configuration file by a META-INF/faces-config.xml file in the last JAR file found in the application's resource path, e.g., the JAR files in the WEB-INF/lib directory.

  4. The factory class named on the first line of a META-INF/services/{factory-class-name} resource available to the application's class loader.

  5. The JSF implementation's default class.

Synopsis

Class name:

javax.faces.FactoryFinder

Extends:

None

Implements:

None

Fields


public static String APPLICATION_FACTORY

The factory name for the ApplicationFactory class: javax.faces.application.ApplicationFacory.


public static String FACES_CONTEXT_FACTORY

The factory name for the FacesContextFactory class: javax.faces.context.FacesContextFacory.


public static String LIFECYCLE_FACTORY

The factory name for the LifecycleFactory class: javax.faces.lifecycle.LifecycleFacory.


public static String RENDER_KIT_FACTORY

The factory name for the RenderKitFactory class: javax.faces.render.RenderKitFacory.

Methods


public static Object getFactory(String factoryName)

Returns the per-application single instance of the class registered for the named factory.


public static void releaseFactories()

Releases all references to the factory class instances. This method should be called only by the JSF implementation when the web application is shut down.


public static void setFactory(String factoryName, String factoryClassName)

Creates a mapping between the factory name and an implementation class, unless the named factory has already been looked up by a previous call to the getFactory() method. This method should be called only by the JSF implementation to create mappings corresponding to the precedence rules.

    Previous Section  < Day Day Up >  Next Section