Application represents a per-web-application singleton object where applications based on Jakarta Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by Jakarta Faces. Default implementations of each object are provided for cases where the application does not choose to customize the behavior.
The instance of Application is created by calling the getApplication() method of
ApplicationFactory. Because this instance is shared, it must be implemented in a thread-safe manner.
The application also acts as a factory for several types of Objects specified in the Faces Configuration file. Please
see Application#createComponent, Application#createConverter, and
Application#createValidator.
| Modifier and Type | Field and Description |
|---|---|
| private Application |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addBehavior(String
The behavior id to be registered behaviorId, String The fully qualified class name of the corresponding behaviorClass)Behavior implementation
Register a new mapping of behavior id to the name of the corresponding
|
| public abstract void | addComponent(String
The component type to be registered componentType, String The fully qualified class name of the corresponding componentClass)UIComponent implementation
Register a new mapping of component type to the name of the corresponding |
| public abstract void | addConverter(String
The converter id to be registered converterId, String The fully qualified class name of the corresponding converterClass)Converter implementation
Register a new mapping of converter id to the name of the corresponding |
| public abstract void | addConverter(Class<?>
The class for which this converter is registered targetClass, String The fully qualified class name of the corresponding converterClass)Converter implementationRegister a new converter class that is capable of performing conversions for the specified target class. |
| public void | addDefaultValidatorId(String
the validator id. validatorId)
Register a validator by its id that is applied to all |
| public void | addELContextListener(ELContextListener
the Jakarta Expression Language context listener to add. listener)
Provide a way for Faces applications to register an |
| public void | addELResolver(ELResolver
the Jakarta Expression Language resolver to add. resolver)
Cause an the argument |
| public void | addSearchKeywordResolver(SearchKeywordResolver
the SearchKeywordResolver to add. resolver)
Cause the argument |
| public abstract void | addValidator(String
The validator id to be registered validatorId, String The fully qualified class name of the corresponding validatorClass)Validator implementation
Register a new mapping of validator id to the name of the corresponding |
| public Behavior | Returns: the behavior.The behavior id for which to create and return a new behaviorId)Behavior instance
Instantiate and return a new |
| public abstract UIComponent | Returns: the UI component.The component type for which to create and return a new componentType)UIComponent instance
Instantiate and return a new |
| public UIComponent | Returns: the UI component.ValueExpression representing a component value expression (typically specified by
the component attribute of a custom tag)FacesContext for the current requestComponent type to create if the componentType)ValueExpression does not return a component instance
Call the |
| public UIComponent | Returns: the UI component.ValueExpression representing a component value expression (typically specified by
the component attribute of a custom tag)FacesContext for the current requestComponent type to create if the componentType, String ValueExpression does not return a component instanceThe renderer-type of the rendererType)Renderer that will render this component. A
null value must be accepted for this parameter.
Like |
| public UIComponent | Returns: the UI component.FacesContext for the current requestComponent type to create componentType, String The renderer-type of the rendererType)Renderer that will render this component. A
null value must be accepted for this parameter.
Like |
| public UIComponent | Returns: the UI component.FacesContext for the current requestA componentResource)Resource that points to a source file that provides an implementation of a
component.
Instantiate and return a new |
| public abstract Converter | Returns: the converter.The converter id for which to create and return a new converterId)Converter instance
Instantiate and return a new
If the |
| public abstract Converter | Returns: the converter.Target class for which to return a targetClass)Converter
Instantiate and return a new |
| public abstract Validator | Returns: the validator.The validator id for which to create and return a new validatorId)Validator instance
Instantiate and return a new
The argument |
| public < the return type. T> T | Returns: the result of the evaluation.the Faces context. context, String the expression. expression, Class<? extends T> the expected type. expectedType)Get a value by evaluating an expression. |
| public abstract ActionListener | Returns: the action listener.
Return the default |
| public Iterator | Returns: an iterator with behavior ids.
Return an |
| public abstract Iterator | Returns: an iterator with component types.
Return an |
| public abstract Iterator | Returns: an iterator with converter ids.
Return an |
| public abstract Iterator | Returns: an iterator with converter types.
Return an |
| public abstract Locale | Returns: the default Locale, ornull.
Return the default |
| public abstract String | Returns: the default render kit id, ornull.
Return the |
| public Map | Returns: a map of default validator information.
Return an immutable |
| public ELContextListener[] | Returns: an array of Jakarta Expression Language context listeners.
If no calls have been made to |
| public ELResolver | Returns: the Jakarta Expression Language resolver.
Return the singleton |
| public ExpressionFactory | Returns: the expression factory.
Return the |
| public FlowHandler | Returns: the flow handler.
Return the thread-safe singleton |
| public abstract String | Returns: the message bundle class name, ornull.
Return the fully qualified class name of the |
| public abstract NavigationHandler | Returns: the navigation handler.
Return the |
| public ProjectStage | Returns: the project stage.Return the project stage for the currently running application instance. |
| public ResourceBundle | Returns: the resource bundle.the Faces context. ctx, String the name of the resource bundle. name)
Find a |
| public ResourceHandler | Returns: the resource handler.
Return the singleton, stateless, thread-safe |
| public SearchExpressionHandler | Returns: theSearchExpressionHandler.
Return the thread-safe singleton |
| public SearchKeywordResolver | Returns: theSearchKeywordResolver.
Return the singleton |
| public abstract StateManager | Returns: the state manager.
Return the |
| public abstract Iterator | Returns: an iterator of the supported locales.
Return an |
| public abstract Iterator | Returns: an iterator of validator ids.
Return an |
| public abstract ViewHandler | Returns: the view handler.
Return the |
| public void | publishEvent(FacesContext
the context, Class<? extends SystemEvent> FacesContext for the current requestThe systemEventClass, Object Class of event that is being published.The source for the event of type source)systemEventClass.
If |
| public void | publishEvent(FacesContext
the context, Class<? extends SystemEvent> FacesContext for the current requestThe systemEventClass, Class<?> Class of event that is being published.The sourceBaseType, Object Class of the source event that must be used to lookup the listener to which
this event must be published. If this argument is null the return from source.getClass()
must be used as the sourceBaseType.The source for the event of type source)systemEventClass.
This method functions exactly like |
| public void | removeELContextListener(ELContextListener
the Jakarta Expression Language context listener to remove. listener)
Remove the argument |
| public abstract void | setActionListener(ActionListener
The new default listener)ActionListener
Set the default |
| public abstract void | |
| public abstract void | setDefaultRenderKitId(String
the render kit id to set. renderKitId)
Set the |
| public void | setFlowHandler(FlowHandler
the flow handler to set. newHandler)
Set the |
| public abstract void | setMessageBundle(String
Base name of the resource bundle to be used bundle)
Set the fully qualified class name of the |
| public abstract void | setNavigationHandler(NavigationHandler
The new handler)NavigationHandler instance
Set the |
| public void | setResourceHandler(ResourceHandler
The new resourceHandler)ResourceHandler instance
Set the |
| public void | setSearchExpressionHandler(SearchExpressionHandler searchExpressionHandler)
Set the |
| public abstract void | setStateManager(StateManager
The new manager)StateManager instance
Set the |
| public abstract void | setSupportedLocales(Collection<Locale>
The set of supported locales)Locales for this application
Set the |
| public abstract void | setViewHandler(ViewHandler
The new handler)ViewHandler instance
Set the |
| public void | subscribeToEvent(Class<? extends SystemEvent>
the systemEventClass, Class<?> Class of event for which listener must be fired.the sourceClass, SystemEventListener Class of the instance which causes events of type systemEventClass
to be fired. May be null.the implementation of listener)jakarta.faces.event.SystemEventListener whose
jakarta.faces.event.SystemEventListener#processEvent method must be called when events of type
systemEventClass are fired.
Install the listener instance referenced by argument |
| public void | subscribeToEvent(Class<? extends SystemEvent>
the systemEventClass, SystemEventListener Class of event for which listener must be fired.the implementation of listener)jakarta.faces.event.SystemEventListener whose
jakarta.faces.event.SystemEventListener#processEvent method must be called when events of type
systemEventClass are fired.
See
Install the listener instance referenced by argument |
| public void | unsubscribeFromEvent(Class<? extends SystemEvent>
the systemEventClass, Class<?> Class of event for which listener must be fired.the sourceClass, SystemEventListener Class of the instance which causes events of type systemEventClass
to be fired. May be null.the implementation of listener)jakarta.faces.event.SystemEventListener to remove from the internal
data structure.
Remove the listener instance referenced by argument |
| public void | unsubscribeFromEvent(Class<? extends SystemEvent>
the systemEventClass, SystemEventListener Class of event for which listener must be fired.the implementation of listener)jakarta.faces.event.SystemEventListener to remove from the internal
data structure.
Remove the listener instance referenced by argument |