public class ApplicationImpl
extends jakarta.faces.application.Application
Application represents a per-web-application singleton object where applications based on JavaServer Faces (or implementations wishing to provide extended functionality) can register application-wide singletons that provide functionality required by JavaServer Faces.
| Modifier and Type | Field and Description |
|---|---|
static String |
THIS_LIBRARY |
| Constructor and Description |
|---|
ApplicationImpl()
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addBehavior(String behaviorId,
String behaviorClass)
Register a new mapping of behavior id to the name of the corresponding
Behavior class. |
void |
addComponent(String componentType,
String componentClass)
Register a new mapping of component type to the name of the corresponding
UIComponent class. |
void |
addConverter(Class<?> targetClass,
String converterClass)
Register a new converter class that is capable of performing conversions for the specified target class.
|
void |
addConverter(String converterId,
String converterClass)
Register a new mapping of converter id to the name of the corresponding
Converter class. |
void |
addDefaultValidatorId(String validatorId)
Register a validator by its id that is applied to all |
void |
addELContextListener(jakarta.el.ELContextListener listener)
Provide a way for Faces applications to register an
ELContextListener that will be notified on creation
of ELContext instances. |
void |
addELResolver(jakarta.el.ELResolver resolver)
Cause an the argument
resolver to be added to the
resolver chain as specified in section 5.5.1 of the Jakarta Server Faces Specification. |
void |
addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver resolver)
Cause the argument |
void |
addValidator(String validatorId,
String validatorClass)
Register a new mapping of validator id to the name of the corresponding
Validator class. |
jakarta.faces.component.behavior.Behavior |
createBehavior(String behaviorId)
Instantiate and return a new
Behavior instance of the class specified
by a previous call to addBehavior() for the specified behavior id. |
jakarta.faces.component.UIComponent |
createComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.application.Resource componentResource)
Instantiate and return a new |
jakarta.faces.component.UIComponent |
createComponent(jakarta.faces.context.FacesContext context,
String componentType,
String rendererType)
Like |
jakarta.faces.component.UIComponent |
createComponent(String componentType)
Instantiate and return a new
UIComponent instance of the class
specified by a previous call to addComponent() for the specified component type. |
jakarta.faces.component.UIComponent |
createComponent(jakarta.faces.el.ValueBinding componentBinding,
jakarta.faces.context.FacesContext context,
String componentType)
Wrap the argument
componentBinding in an implementation of ValueExpression and call through to
Application.createComponent(jakarta.el.ValueExpression,jakarta.faces.context.FacesContext,java.lang.String). |
jakarta.faces.component.UIComponent |
createComponent(jakarta.el.ValueExpression componentExpression,
jakarta.faces.context.FacesContext context,
String componentType)
Call the
getValue() method on the specified
ValueExpression. |
jakarta.faces.component.UIComponent |
createComponent(jakarta.el.ValueExpression componentExpression,
jakarta.faces.context.FacesContext context,
String componentType,
String rendererType)
Like |
jakarta.faces.convert.Converter<?> |
createConverter(Class<?> targetClass)
Instantiate and return a new
Converter instance of the class that
has registered itself as capable of performing conversions for objects of the specified type. |
jakarta.faces.convert.Converter<?> |
createConverter(String converterId)
Instantiate and return a new
Converter instance of the class
specified by a previous call to addConverter() for the specified converter id. |
jakarta.faces.el.MethodBinding |
createMethodBinding(String ref,
Class<?>[] params)
Deprecated.
|
jakarta.faces.validator.Validator<?> |
createValidator(String validatorId)
Instantiate and return a new
Validator instance of the class
specified by a previous call to addValidator() for the specified validator id. |
jakarta.faces.el.ValueBinding |
createValueBinding(String ref)
Deprecated.
|
<T> T |
evaluateExpressionGet(jakarta.faces.context.FacesContext context,
String expression,
Class<? extends T> expectedType)
Get a value by evaluating an expression.
|
jakarta.faces.event.ActionListener |
getActionListener()
Return the default
ActionListener to be registered for all
ActionSource components in this application. |
jakarta.el.CompositeELResolver |
getApplicationELResolvers() |
Iterator<String> |
getBehaviorIds()
Return an
Iterator over the set of currently registered behavior ids for this Application. |
Iterator<String> |
getComponentTypes()
Return an
Iterator over the set of currently defined component types for this Application. |
FacesCompositeELResolver |
getCompositeELResolver() |
Iterator<String> |
getConverterIds()
Return an
Iterator over the set of currently registered converter ids for this Application. |
Iterator<Class<?>> |
getConverterTypes()
Return an
Iterator over the set of Class instances for which Converter classes have
been explicitly registered. |
Locale |
getDefaultLocale()
Return the default
Locale for this application. |
String |
getDefaultRenderKitId()
Return the
renderKitId to be used for rendering this application. |
Map<String,String> |
getDefaultValidatorInfo()
Return an immutable |
jakarta.el.ELContextListener[] |
getELContextListeners()
If no calls have been made to
Application.addELContextListener(jakarta.el.ELContextListener), this method must return an empty array. |
jakarta.el.ELResolver |
getELResolver()
Return the singleton
ELResolver instance to be used for all Jakarta Expression Language resolution. |
jakarta.el.ExpressionFactory |
getExpressionFactory()
Return the
ExpressionFactory instance for this application. |
jakarta.faces.flow.FlowHandler |
getFlowHandler()
Return the thread-safe singleton |
String |
getMessageBundle()
Return the fully qualified class name of the
ResourceBundle to be used for Jakarta Server Faces messages
for this application. |
jakarta.faces.application.NavigationHandler |
getNavigationHandler()
Return the
NavigationHandler instance that will be passed the outcome returned by any invoked application
action for this web application. |
jakarta.faces.application.ProjectStage |
getProjectStage()
Return the project stage for the currently running application instance. |
jakarta.faces.el.PropertyResolver |
getPropertyResolver()
Deprecated.
|
ResourceBundle |
getResourceBundle(jakarta.faces.context.FacesContext context,
String var)
Find a
ResourceBundle as defined in the application configuration resources under the specified name. |
jakarta.faces.application.ResourceHandler |
getResourceHandler()
Return the singleton, stateless, thread-safe |
jakarta.faces.component.search.SearchExpressionHandler |
getSearchExpressionHandler()
Return the thread-safe singleton |
jakarta.faces.component.search.SearchKeywordResolver |
getSearchKeywordResolver()
Return the singleton |
jakarta.faces.application.StateManager |
getStateManager()
Return the
StateManager instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. |
Iterator<Locale> |
getSupportedLocales()
Return an
Iterator over the supported Locales for this appication. |
Iterator<String> |
getValidatorIds()
Return an
Iterator over the set of currently registered validator ids for this Application. |
jakarta.faces.el.VariableResolver |
getVariableResolver()
Deprecated.
|
jakarta.faces.application.ViewHandler |
getViewHandler()
Return the
ViewHandler instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. |
void |
publishEvent(jakarta.faces.context.FacesContext context,
Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Class<?> sourceBaseType,
Object source)
This method functions exactly like |
void |
publishEvent(jakarta.faces.context.FacesContext context,
Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Object source)
If |
void |
removeELContextListener(jakarta.el.ELContextListener listener)
Remove the argument
listener from the list of ELContextListeners. |
void |
setActionListener(jakarta.faces.event.ActionListener actionListener)
Set the default
ActionListener to be registered for all ActionSource
components. |
void |
setCompositeELResolver(FacesCompositeELResolver compositeELResolver) |
void |
setDefaultLocale(Locale locale)
Set the default
Locale for this application. |
void |
setDefaultRenderKitId(String renderKitId)
Set the
renderKitId to be used to render this application. |
void |
setFlowHandler(jakarta.faces.flow.FlowHandler flowHandler)
Set the |
void |
setMessageBundle(String messageBundle)
Set the fully qualified class name of the
ResourceBundle to be used for Jakarta Server Faces messages
for this application. |
void |
setNavigationHandler(jakarta.faces.application.NavigationHandler navigationHandler)
Set the
NavigationHandler instance that will be passed the outcome returned by any invoked application action
for this web application. |
void |
setPropertyResolver(jakarta.faces.el.PropertyResolver resolver)
Deprecated.
|
void |
setResourceHandler(jakarta.faces.application.ResourceHandler resourceHandler)
Set the |
void |
setSearchExpressionHandler(jakarta.faces.component.search.SearchExpressionHandler searchExpressionHandler)
Set the |
void |
setStateManager(jakarta.faces.application.StateManager stateManager)
Set the
StateManager instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. |
void |
setSupportedLocales(Collection<Locale> newLocales)
Set the
Locale instances representing the supported Locales for this application. |
void |
setVariableResolver(jakarta.faces.el.VariableResolver resolver)
Deprecated.
|
void |
setViewHandler(jakarta.faces.application.ViewHandler viewHandler)
Set the
ViewHandler instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. |
void |
subscribeToEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Class<?> sourceClass,
jakarta.faces.event.SystemEventListener listener)
Install the listener instance referenced by argument |
void |
subscribeToEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
jakarta.faces.event.SystemEventListener listener)
Install the listener instance referenced by argument |
void |
unsubscribeFromEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Class<?> sourceClass,
jakarta.faces.event.SystemEventListener listener)
Remove the listener instance referenced by argument |
void |
unsubscribeFromEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
jakarta.faces.event.SystemEventListener listener)
Remove the listener instance referenced by argument |
public static final String THIS_LIBRARY
public void publishEvent(jakarta.faces.context.FacesContext context,
Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Object source)
jakarta.faces.application.Application
If FacesContext.isProcessingEvents() is true and there are one or more
listeners for events of the type represented by systemEventClass, call those listeners, passing
source as the source of the event. The implementation should be as fast as possible in determining
whether or not a listener for the given systemEventClass and source has been installed, and
should return immediately once such a determination has been made. The implementation of publishEvent
must honor the requirements stated in Application.subscribeToEvent(java.lang.Class<? extends jakarta.faces.event.SystemEvent>, java.lang.Class<?>, jakarta.faces.event.SystemEventListener) regarding the storage and retrieval of listener
instances. Specifically, if Application.subscribeToEvent(Class,Class,SystemEventListener) was called, the
sourceClass argument must match exactly the Class of the source argument in
the call to publishEvent(). The implementation must not do any inheritance hierarachy inspection when
looking for a match between the sourceClass passed to
Application.subscribeToEvent(Class,Class,SystemEventListener) and the sourceClass passed to
publishEvent() in order to find any listeners to which the event should be published. In the case where
the Class of the source argument does not match the Class of the
sourceClass used when the listener was subscribed using subscribeToEvent(),
Application.publishEvent(FacesContext,Class,Class,Object) can be used to provide the Class used to perform
the listener lookup and match.
The default implementation must implement an algorithm semantically equivalent to the following to locate listener instances and to invoke them.
If the source argument implements SystemEventListenerHolder, call
SystemEventListenerHolder.getListenersForEventClass(java.lang.Class<? extends jakarta.faces.event.SystemEvent>) on it, passing the
systemEventClass argument. If the list is not empty, perform algorithm traverseListenerList on
the list.
If any view level listeners have been installed by previous calls to
Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener) on the
UIViewRoot, perform algorithm traverseListenerList on the list of listeners
for that event installed on the UIViewRoot.
If any Application level listeners have been installed by previous calls to
Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener), perform algorithm
traverseListenerList on the list.
If any Application level listeners have been installed by previous calls to
Application.subscribeToEvent(Class, jakarta.faces.event.SystemEventListener), perform algorithm
traverseListenerList on the list.
If the act of invoking the processListener method causes an
AbortProcessingException to be thrown, processing of the listeners must be aborted, no
further processing of the listeners for this event must take place, and the exception must be logged with
Level.SEVERE.
Algorithm traverseListenerList: For each listener in the list,
Call SystemEventListener.isListenerForSource(java.lang.Object), passing the source argument.
If this returns false, take no action on the listener.
Otherwise, if the event to be passed to the listener instances has not yet been constructed, construct the event,
passing source as the argument to the one-argument constructor that takes an Object. This
same event instance must be passed to all listener instances.
Call SystemEvent.isAppropriateListener(jakarta.faces.event.FacesListener), passing the listener instance as the argument. If
this returns false, take no action on the listener.
Call SystemEvent.processListener(jakarta.faces.event.FacesListener), passing the listener instance.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
publishEvent in class jakarta.faces.application.Applicationcontext - the FacesContext for the current requestsystemEventClass - The Class of event that is being published.source - The source for the event of type systemEventClass.Application.publishEvent(FacesContext, Class, Object)public void publishEvent(jakarta.faces.context.FacesContext context,
Class<? extends jakarta.faces.event.SystemEvent> systemEventClass,
Class<?> sourceBaseType,
Object source)
jakarta.faces.application.Application
This method functions exactly like Application.publishEvent(FacesContext,Class,Object), except the run-time must use the
argument sourceBaseType to find the matching listener instead of using the Class of the
source argument.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
publishEvent in class jakarta.faces.application.Applicationcontext - the FacesContext for the current requestsystemEventClass - The Class of event that is being published.sourceBaseType - The 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.source - The source for the event of type systemEventClass.Application.publishEvent(FacesContext, Class, Object)public void subscribeToEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass, jakarta.faces.event.SystemEventListener listener)
jakarta.faces.application.Application
Install the listener instance referenced by argument listener
into application as a listener for events of type systemEventClass. The default implementation simply
calls through to Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener) passing
null as the sourceClass argument
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
subscribeToEvent in class jakarta.faces.application.ApplicationsystemEventClass - the Class of event for which listener must be fired.listener - the implementation of SystemEventListener whose
SystemEventListener.processEvent(jakarta.faces.event.SystemEvent) method must be called when events of type
systemEventClass are fired.
See Application.subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener) for an
additional requirement regarding when it is valid to call this method.
Application.subscribeToEvent(Class, jakarta.faces.event.SystemEventListener)public void subscribeToEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass, Class<?> sourceClass, jakarta.faces.event.SystemEventListener listener)
jakarta.faces.application.Application
Install the listener instance referenced by argument listener
into the application as a listener for events of type systemEventClass that originate from objects of
type sourceClass.
If argument sourceClass is non-null, sourceClass and
systemEventClass must be used to store the argument listener in the application in such a
way that the listener can be quickly looked up by the implementation of Application.publishEvent(jakarta.faces.context.FacesContext, java.lang.Class<? extends jakarta.faces.event.SystemEvent>, java.lang.Object) given
systemEventClass and an instance of the Class referenced by sourceClass. If
argument sourceClass is null, the listener must be discoverable by the
implementation of Application.publishEvent(jakarta.faces.context.FacesContext, java.lang.Class<? extends jakarta.faces.event.SystemEvent>, java.lang.Object) given only systemEventClass.
It is valid to call this method during the processing of an event which was subscribed to by a previous call to this method.
subscribeToEvent in class jakarta.faces.application.ApplicationsystemEventClass - the Class of event for which listener must be fired.sourceClass - the Class of the instance which causes events of type systemEventClass
to be fired. May be null.listener - the implementation of SystemEventListener whose
SystemEventListener.processEvent(jakarta.faces.event.SystemEvent) method must be called when events of type
systemEventClass are fired.Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)public void unsubscribeFromEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass, jakarta.faces.event.SystemEventListener listener)
jakarta.faces.application.Application
Remove the listener instance referenced by argument listener
from the application as a listener for events of type systemEventClass. The default implementation
simply calls through to Application.unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener) passing
null as the sourceClass argument
See Application.subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener) for an
additional requirement regarding when it is valid to call this method.
unsubscribeFromEvent in class jakarta.faces.application.ApplicationsystemEventClass - the Class of event for which listener must be fired.listener - the implementation of SystemEventListener to remove from the internal
data structure.Application.unsubscribeFromEvent(Class, jakarta.faces.event.SystemEventListener)public void unsubscribeFromEvent(Class<? extends jakarta.faces.event.SystemEvent> systemEventClass, Class<?> sourceClass, jakarta.faces.event.SystemEventListener listener)
jakarta.faces.application.Application
Remove the listener instance referenced by argument listener
from the application as a listener for events of type systemEventClass that originate from objects of
type sourceClass. See Application.subscribeToEvent(Class, Class, jakarta.faces.event.SystemEventListener)
for the specification of how the listener is stored, and therefore, how it must be removed.
See Application.subscribeToEvent(java.lang.Class,java.lang.Class,jakarta.faces.event.SystemEventListener) for an
additional requirement regarding when it is valid to call this method.
unsubscribeFromEvent in class jakarta.faces.application.ApplicationsystemEventClass - the Class of event for which listener must be fired.sourceClass - the Class of the instance which causes events of type systemEventClass
to be fired. May be null.listener - the implementation of SystemEventListener to remove from the internal
data structure.Application.unsubscribeFromEvent(Class, Class, jakarta.faces.event.SystemEventListener)public void addELContextListener(jakarta.el.ELContextListener listener)
jakarta.faces.application.Application
Provide a way for Faces applications to register an ELContextListener that will be notified on creation
of ELContext instances. This listener will be called once per request.
An implementation is provided that throws UnsupportedOperationException so that users that decorate the
Application continue to work.
addELContextListener in class jakarta.faces.application.Applicationlistener - the Jakarta Expression Language context listener to add.Application.addELContextListener(jakarta.el.ELContextListener)public void removeELContextListener(jakarta.el.ELContextListener listener)
jakarta.faces.application.Application
Remove the argument listener from the list of ELContextListeners. If listener is
null, no exception is thrown and no action is performed. If listener is not in the list, no exception is
thrown and no action is performed.
An implementation is provided that throws UnsupportedOperationException so that users that decorate the
Application continue to work.
removeELContextListener in class jakarta.faces.application.Applicationlistener - the Jakarta Expression Language context listener to remove.Application.removeELContextListener(jakarta.el.ELContextListener)public jakarta.el.ELContextListener[] getELContextListeners()
jakarta.faces.application.Application
If no calls have been made to Application.addELContextListener(jakarta.el.ELContextListener), this method must return an empty array.
Otherwise, return an array representing the list of listeners added by calls to Application.addELContextListener(jakarta.el.ELContextListener).
An implementation is provided that throws UnsupportedOperationException so that users that decorate the
Application continue to work.
getELContextListeners in class jakarta.faces.application.ApplicationApplication.getELContextListeners()public jakarta.el.ExpressionFactory getExpressionFactory()
jakarta.faces.application.Application
Return the ExpressionFactory instance for this application. This instance is used by the convenience method
Application.evaluateExpressionGet(jakarta.faces.context.FacesContext, java.lang.String, java.lang.Class<? extends T>).
The implementation must return the ExpressionFactory from the Jakarta Server Pages container by calling
JspFactory.getDefaultFactory().getJspApplicationContext(servletContext).getExpressionFactory().
An implementation is provided that throws UnsupportedOperationException so that users that decorate the
Application continue to work.
getExpressionFactory in class jakarta.faces.application.ApplicationApplication.getExpressionFactory()public <T> T evaluateExpressionGet(jakarta.faces.context.FacesContext context,
String expression,
Class<? extends T> expectedType)
throws jakarta.el.ELException
jakarta.faces.application.ApplicationGet a value by evaluating an expression.
Call Application.getExpressionFactory() then call ExpressionFactory.createValueExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class<?>) passing the argument
expression and expectedType. Call FacesContext.getELContext() and pass it to
ValueExpression.getValue(jakarta.el.ELContext), returning the result.
An implementation is provided that throws UnsupportedOperationException so that users that decorate the
Application continue to work.
evaluateExpressionGet in class jakarta.faces.application.ApplicationT - the return type.context - the Faces context.expression - the expression.expectedType - the expected type.jakarta.el.ELExceptionApplication.evaluateExpressionGet(jakarta.faces.context.FacesContext, String, Class)public jakarta.el.ELResolver getELResolver()
jakarta.faces.application.Application
Return the singleton ELResolver instance to be used for all Jakarta Expression Language resolution. This is
actually an instance of CompositeELResolver that must contain the following
ELResolver instances in the following order:
ELResolver instances declared using the <el-resolver> element in the application configuration
resources.
An implementation that wraps the head of the legacy VariableResolver chain, as per section
VariableResolver ChainWrapper in Chapter 5 in the spec document.
An implementation that wraps the head of the legacy PropertyResolver chain, as per section
PropertyResolver ChainWrapper in Chapter 5 in the spec document.
Any ELResolver instances added by calls to Application.addELResolver(jakarta.el.ELResolver).
The default implementation throws UnsupportedOperationException and is provided for the sole purpose of
not breaking existing applications that extend Application.
getELResolver in class jakarta.faces.application.ApplicationApplication.getELResolver()public void addELResolver(jakarta.el.ELResolver resolver)
jakarta.faces.application.Application
Cause an the argument resolver to be added to the
resolver chain as specified in section 5.5.1 of the Jakarta Server Faces Specification.
It is not possible to remove an ELResolver registered with this method, once it has been registered.
It is illegal to register an ELResolver after the application has received any requests from the client.
If an attempt is made to register a listener after that time, an IllegalStateException must be thrown.
This restriction is in place to allow the Jakarta Server Pages container to optimize for the common case where no
additional ELResolvers are in the chain, aside from the standard ones. It is permissible to add
ELResolvers before or after initialization to a CompositeELResolver that is already in the
chain.
The default implementation throws UnsupportedOperationException and is provided for the sole purpose of
not breaking existing applications that extend Application.
addELResolver in class jakarta.faces.application.Applicationresolver - the Jakarta Expression Language resolver to add.Application.addELResolver(jakarta.el.ELResolver)public jakarta.el.CompositeELResolver getApplicationELResolvers()
public FacesCompositeELResolver getCompositeELResolver()
public void setCompositeELResolver(FacesCompositeELResolver compositeELResolver)
public jakarta.faces.application.ViewHandler getViewHandler()
jakarta.faces.application.Application
Return the ViewHandler instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. If not explicitly set, a default implementation must be
provided that performs the functions described in the ViewHandler description in the JJakarta Server Faces
Specification.
getViewHandler in class jakarta.faces.application.ApplicationApplication.getViewHandler()public void setViewHandler(jakarta.faces.application.ViewHandler viewHandler)
jakarta.faces.application.Application
Set the ViewHandler instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle.
setViewHandler in class jakarta.faces.application.ApplicationviewHandler - The new ViewHandler instanceApplication.setViewHandler(jakarta.faces.application.ViewHandler)public jakarta.faces.application.ResourceHandler getResourceHandler()
jakarta.faces.application.Application
Return the singleton, stateless, thread-safe ResourceHandler for this application. The Jakarta Server Faces
implementation must support the following techniques for declaring an alternate implementation of
ResourceHandler.
The ResourceHandler implementation is declared in the application configuration resources by giving the
fully qualified class name as the value of the <resource-handler> element within the
<application> element.
In all of the above cases, the runtime must employ the decorator pattern as for every other pluggable artifact in Jakarta Server Faces.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
getResourceHandler in class jakarta.faces.application.ApplicationApplication.getResourceHandler()public void setResourceHandler(jakarta.faces.application.ResourceHandler resourceHandler)
jakarta.faces.application.Application
Set the ResourceHandler instance that will be utilized for rendering the markup for resources, and for
satisfying client requests to serve up resources.
setResourceHandler in class jakarta.faces.application.ApplicationresourceHandler - The new ResourceHandler instanceApplication.setResourceHandler(jakarta.faces.application.ResourceHandler)public jakarta.faces.application.StateManager getStateManager()
jakarta.faces.application.Application
Return the StateManager instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle. If not explicitly set, a default implementation must be
provided that performs the functions described in the StateManager description in the Jakarta Server Faces
Specification.
getStateManager in class jakarta.faces.application.ApplicationApplication.getStateManager()public void setStateManager(jakarta.faces.application.StateManager stateManager)
jakarta.faces.application.Application
Set the StateManager instance that will be utilized during the Restore View and Render
Response phases of the request processing lifecycle.
setStateManager in class jakarta.faces.application.ApplicationstateManager - The new StateManager instanceApplication.setStateManager(jakarta.faces.application.StateManager)public jakarta.faces.event.ActionListener getActionListener()
jakarta.faces.application.Application
Return the default ActionListener to be registered for all
ActionSource components in this application. If not explicitly set, a default
implementation must be provided that performs the functions as specified in the
section titled "ActionListener Property" in the chapter titled "Application Integration" of the spec prose
document.
Note that the specification for the default ActionListener contiues to call for the use of a
deprecated property (action) and class (MethodBinding). Unfortunately,
this is necessary because the default ActionListener must continue to work with components that do not
implement ActionSource2, and only implement
ActionSource.
getActionListener in class jakarta.faces.application.ApplicationApplication.getActionListener()public void setActionListener(jakarta.faces.event.ActionListener actionListener)
jakarta.faces.application.Application
Set the default ActionListener to be registered for all ActionSource
components.
setActionListener in class jakarta.faces.application.ApplicationactionListener - The new default ActionListenerApplication.setActionListener(jakarta.faces.event.ActionListener)public jakarta.faces.application.NavigationHandler getNavigationHandler()
jakarta.faces.application.Application
Return the NavigationHandler instance that will be passed the outcome returned by any invoked application
action for this web application. If not explicitly set, a default implementation must be provided that performs the
functions described in the NavigationHandler class description.
NavigationHandler implementation is declared in the application configuration resources by
giving the fully qualified class name as the value of the <navigation-handler> element within the
<application> element.The runtime must employ the decorator pattern as for every other pluggable artifact in Jakarta Server Faces.
getNavigationHandler in class jakarta.faces.application.ApplicationApplication.getNavigationHandler()public void setNavigationHandler(jakarta.faces.application.NavigationHandler navigationHandler)
jakarta.faces.application.Application
Set the NavigationHandler instance that will be passed the outcome returned by any invoked application action
for this web application.
setNavigationHandler in class jakarta.faces.application.ApplicationnavigationHandler - The new NavigationHandler instanceApplication.setNavigationHandler(jakarta.faces.application.NavigationHandler)public jakarta.faces.flow.FlowHandler getFlowHandler()
jakarta.faces.application.Application
Return the thread-safe singleton FlowHandler for this application. For implementations declaring compliance
with version 2.2 of the specification, this method must never return null, even if the application has no
flows. This is necessary to enable dynamic flow creation during the application's lifetime.
All implementations that declare compliance with version 2.2 of the specification must implement this method. For the
purpose of backward compatibility with environments that extend Application but do not override this method, an implementation is provided that returns null. Due to the
decoratable nature of Application, code calling this method should always check for a null return.
getFlowHandler in class jakarta.faces.application.Applicationpublic void setFlowHandler(jakarta.faces.flow.FlowHandler flowHandler)
jakarta.faces.application.Application
Set the FlowHandler instance used by the NavigationHandler to satisfy the requirements of the faces
flows feature.
setFlowHandler in class jakarta.faces.application.ApplicationflowHandler - the flow handler to set.public Iterator<Locale> getSupportedLocales()
jakarta.faces.application.Application
Return an Iterator over the supported Locales for this appication.
getSupportedLocales in class jakarta.faces.application.ApplicationApplication.getSupportedLocales()public void setSupportedLocales(Collection<Locale> newLocales)
jakarta.faces.application.Application
Set the Locale instances representing the supported Locales for this application.
setSupportedLocales in class jakarta.faces.application.ApplicationnewLocales - The set of supported Locales for this applicationApplication.setSupportedLocales(java.util.Collection)public Locale getDefaultLocale()
jakarta.faces.application.Application
Return the default Locale for this application. If not explicitly set, null is returned.
getDefaultLocale in class jakarta.faces.application.Applicationnull.Application.getDefaultLocale()public void setDefaultLocale(Locale locale)
jakarta.faces.application.Application
Set the default Locale for this application.
setDefaultLocale in class jakarta.faces.application.Applicationlocale - The new default LocaleApplication.setDefaultLocale(java.util.Locale)public void setMessageBundle(String messageBundle)
jakarta.faces.application.Application
Set the fully qualified class name of the ResourceBundle to be used for Jakarta Server Faces messages
for this application. See the JavaDocs for the java.util.ResourceBundle class for more information about
the syntax for resource bundle names.
setMessageBundle in class jakarta.faces.application.ApplicationmessageBundle - Base name of the resource bundle to be usedApplication.setMessageBundle(String)public String getMessageBundle()
jakarta.faces.application.Application
Return the fully qualified class name of the ResourceBundle to be used for Jakarta Server Faces messages
for this application. If not explicitly set, null is returned.
getMessageBundle in class jakarta.faces.application.Applicationnull.Application.getMessageBundle()public String getDefaultRenderKitId()
jakarta.faces.application.Application
Return the renderKitId to be used for rendering this application. If not explicitly set,
null is returned.
getDefaultRenderKitId in class jakarta.faces.application.Applicationnull.Application.getDefaultRenderKitId()public void setDefaultRenderKitId(String renderKitId)
jakarta.faces.application.Application
Set the renderKitId to be used to render this application. Unless the client has provided a custom
ViewHandler that supports the use of multiple RenderKit instances in the same
application, this method must only be called at application startup, before any Faces requests have been processed.
This is a limitation of the current Specification, and may be lifted in a future release.
setDefaultRenderKitId in class jakarta.faces.application.ApplicationrenderKitId - the render kit id to set.Application.setDefaultRenderKitId(String)public ResourceBundle getResourceBundle(jakarta.faces.context.FacesContext context, String var)
jakarta.faces.application.Application
Find a ResourceBundle as defined in the application configuration resources under the specified name. If
a ResourceBundle was defined for the name, return an instance that uses the locale of the current
UIViewRoot.
The default implementation throws UnsupportedOperationException and is provided for the sole purpose of
not breaking existing applications that extend this class.
getResourceBundle in class jakarta.faces.application.Applicationcontext - the Faces context.var - the name of the resource bundle.Application.getResourceBundle(jakarta.faces.context.FacesContext, String)public void addBehavior(String behaviorId, String behaviorClass)
jakarta.faces.application.Application
Register a new mapping of behavior id to the name of the corresponding
Behavior class. This allows subsequent calls to createBehavior() to serve as a factory for
Behavior instances.
addBehavior in class jakarta.faces.application.ApplicationbehaviorId - The behavior id to be registeredbehaviorClass - The fully qualified class name of the corresponding Behavior implementationApplication.addBehavior(String, String)public jakarta.faces.component.behavior.Behavior createBehavior(String behaviorId) throws jakarta.faces.FacesException
jakarta.faces.application.Application
Instantiate and return a new Behavior instance of the class specified
by a previous call to addBehavior() for the specified behavior id.
createBehavior in class jakarta.faces.application.ApplicationbehaviorId - The behavior id for which to create and return a new Behavior instancejakarta.faces.FacesException - if the Behavior cannot be createdApplication.createBehavior(String)public Iterator<String> getBehaviorIds()
jakarta.faces.application.Application
Return an Iterator over the set of currently registered behavior ids for this Application.
getBehaviorIds in class jakarta.faces.application.ApplicationApplication.getBehaviorIds()public jakarta.faces.component.UIComponent createComponent(String componentType) throws jakarta.faces.FacesException
jakarta.faces.application.Application
Instantiate and return a new UIComponent instance of the class
specified by a previous call to addComponent() for the specified component type.
Before the component instance is returned, it must be inspected for the presence of a
ListenerFor (or ListenersFor) or ResourceDependency
(or ResourceDependencies) annotation. If any of these annotations are present, the action listed in
ListenerFor or ResourceDependency must be taken on the component, before it is
returned from this method. This variant of createComponent must not inspect the
Renderer for the component to be returned for any of the afore mentioned annotations.
Such inspection is the province of Application.createComponent(ValueExpression, FacesContext, String, String) or
Application.createComponent(FacesContext, String, String).
createComponent in class jakarta.faces.application.ApplicationcomponentType - The component type for which to create and return a new UIComponent instancejakarta.faces.FacesException - if a UIComponent of the specified type cannot be createdpublic void addComponent(String componentType, String componentClass)
jakarta.faces.application.Application
Register a new mapping of component type to the name of the corresponding UIComponent class. This allows
subsequent calls to createComponent() to serve as a factory for UIComponent instances.
addComponent in class jakarta.faces.application.ApplicationcomponentType - The component type to be registeredcomponentClass - The fully qualified class name of the corresponding UIComponent implementationApplication.addComponent(java.lang.String, java.lang.String)public jakarta.faces.component.UIComponent createComponent(jakarta.el.ValueExpression componentExpression,
jakarta.faces.context.FacesContext context,
String componentType)
throws jakarta.faces.FacesException
jakarta.faces.application.Application
Call the getValue() method on the specified
ValueExpression. If it returns a UIComponent instance, return it as the value of this method. If it
does not, instantiate a new UIComponent instance of the specified component type, pass the new component to
the setValue() method of the specified ValueExpression, and return it.
Before the component instance is returned, it must be inspected for the presence of a
ListenerFor (or ListenersFor) or ResourceDependency
(or ResourceDependencies) annotation. If any of these annotations are present, the action listed in
ListenerFor or ResourceDependency must be taken on the component, before it is
returned from this method. This variant of createComponent must not inspect the
Renderer for the component to be returned for any of the afore mentioned annotations.
Such inspection is the province of Application.createComponent(ValueExpression, FacesContext, String, String) or
Application.createComponent(FacesContext, String, String).
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function.
createComponent in class jakarta.faces.application.ApplicationcomponentExpression - ValueExpression representing a component value expression (typically specified by
the component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueExpression does not return a component instancejakarta.faces.FacesException - if a UIComponent cannot be createdpublic jakarta.faces.component.UIComponent createComponent(jakarta.el.ValueExpression componentExpression,
jakarta.faces.context.FacesContext context,
String componentType,
String rendererType)
jakarta.faces.application.Application
Like Application.createComponent(ValueExpression, FacesContext, String) except the Renderer for the
component to be returned must be inspected for the annotations mentioned in
Application.createComponent(ValueExpression, FacesContext, String) as specified in the documentation for that method.
The Renderer instance to inspect must be obtained by calling FacesContext.getRenderKit() and
calling RenderKit.getRenderer(java.lang.String, java.lang.String) on the result, passing the argument
componentType as the first argument and the result of calling UIComponent.getFamily() on the newly
created component as the second argument. If no such Renderer can be found, a message must be logged
with a helpful error message. Otherwise, UIComponent.setRendererType(java.lang.String) must be called on the newly created
UIComponent instance, passing the argument rendererType as the argument.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function.
createComponent in class jakarta.faces.application.ApplicationcomponentExpression - ValueExpression representing a component value expression (typically specified by
the component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueExpression does not return a component instancerendererType - The renderer-type of the Renderer that will render this component. A
null value must be accepted for this parameter.public jakarta.faces.component.UIComponent createComponent(jakarta.faces.context.FacesContext context,
String componentType,
String rendererType)
jakarta.faces.application.Application
Like Application.createComponent(String) except the Renderer for the component to be returned must be
inspected for the annotations mentioned in Application.createComponent(ValueExpression, FacesContext, String) as
specified in the documentation for that method. The Renderer instance to inspect must be obtained by
calling FacesContext.getRenderKit() and calling RenderKit.getRenderer(java.lang.String, java.lang.String) on the
result, passing the argument componentType as the first argument and the result of calling
UIComponent.getFamily() on the newly created component as the second argument. If no such Renderer
can be found, a message must be logged with a helpful error message. Otherwise, UIComponent.setRendererType(java.lang.String)
must be called on the newly created UIComponent instance, passing the argument rendererType
as the argument.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
createComponent in class jakarta.faces.application.Applicationcontext - FacesContext for the current requestcomponentType - Component type to createrendererType - The renderer-type of the Renderer that will render this component. A
null value must be accepted for this parameter.public jakarta.faces.component.UIComponent createComponent(jakarta.faces.context.FacesContext context,
jakarta.faces.application.Resource componentResource)
throws jakarta.faces.FacesException
jakarta.faces.application.Application
Instantiate and return a new UIComponent instance from the
argument Resource. An algorithm semantically equivalent to the following must be followed to instantiate the
UIComponent to return.
Obtain a reference to the ViewDeclarationLanguage for this Application instance by calling
ViewHandler.getViewDeclarationLanguage(jakarta.faces.context.FacesContext, java.lang.String), passing the viewId found by calling
UIViewRoot.getViewId() on the UIViewRoot in the
argument FacesContext.
Obtain a reference to the composite component metadata for this composite component by calling
ViewDeclarationLanguage.getComponentMetadata(jakarta.faces.context.FacesContext, jakarta.faces.application.Resource), passing the facesContext and
componentResource arguments to this method. This version of the Jakarta Server Faces specification uses
JavaBeans as the API to the component metadata.
Determine if the component author declared a componentType for this component instance by obtaining the
BeanDescriptor from the component metadata and calling its getValue() method, passing
UIComponent.COMPOSITE_COMPONENT_TYPE_KEY as the argument. If non-null, the result must be a
ValueExpression whose value is the component-type of the UIComponent to be
created for this Resource component. Call through to Application.createComponent(java.lang.String) to
create the component.
Otherwise, determine if a script based component for this Resource can be found by calling
ViewDeclarationLanguage.getScriptComponentResource(jakarta.faces.context.FacesContext, jakarta.faces.application.Resource). If the result is non-null, and is a script
written in one of the languages listed in 4.3 of the specification prose document, create a
UIComponent instance from the script resource.
Otherwise, let library-name be the return from calling Resource.getLibraryName() on the argument
componentResource and resource-name be the return from calling Resource.getResourceName()
on the argument componentResource. Create a fully qualified Java class name by removing any file
extension from resource-name and let fqcn be library-name + "." +
resource-name. If a class with the name of fqcn cannot be found, take no action and continue
to the next step. If any of InstantiationException, IllegalAccessException, or
ClassCastException are thrown, wrap the exception in a FacesException and re-throw it. If
any other exception is thrown, log the exception and continue to the next step.
If none of the previous steps have yielded a UIComponent instance, call
Application.createComponent(java.lang.String) passing "jakarta.faces.NamingContainer" as the argument.
Call UIComponent.setRendererType(java.lang.String) on the UIComponent instance, passing
"jakarta.faces.Composite" as the argument.
Store the argument Resource in the attributes Map of the UIComponent under the
key, Resource.COMPONENT_RESOURCE_KEY.
Store composite component metadata in the attributes Map of the UIComponent under
the key, UIComponent.BEANINFO_KEY.
Before the component instance is returned, it must be inspected for the presence of a
ListenerFor annotation. If this annotation is present, the action listed in
ListenerFor must be taken on the component, before it is returned from this method.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function.
createComponent in class jakarta.faces.application.Applicationcontext - FacesContext for the current requestcomponentResource - A Resource that points to a source file that provides an implementation of a
component.jakarta.faces.FacesException - if a UIComponent from the Resource cannot be createdpublic jakarta.faces.component.UIComponent createComponent(jakarta.faces.el.ValueBinding componentBinding,
jakarta.faces.context.FacesContext context,
String componentType)
throws jakarta.faces.FacesException
jakarta.faces.application.Application
Wrap the argument componentBinding in an implementation of ValueExpression and call through to
Application.createComponent(jakarta.el.ValueExpression,jakarta.faces.context.FacesContext,java.lang.String).
createComponent in class jakarta.faces.application.ApplicationcomponentBinding - ValueBinding representing a component value binding expression (typically specified
by the component attribute of a custom tag)context - FacesContext for the current requestcomponentType - Component type to create if the ValueBinding does not return a component instancejakarta.faces.FacesException - if a UIComponent cannot be createdpublic Iterator<String> getComponentTypes()
jakarta.faces.application.Application
Return an Iterator over the set of currently defined component types for this Application.
getComponentTypes in class jakarta.faces.application.ApplicationApplication.getComponentTypes()public void addConverter(String converterId, String converterClass)
jakarta.faces.application.Application
Register a new mapping of converter id to the name of the corresponding Converter class. This allows
subsequent calls to createConverter() to serve as a factory for Converter instances.
addConverter in class jakarta.faces.application.ApplicationconverterId - The converter id to be registeredconverterClass - The fully qualified class name of the corresponding Converter implementationApplication.addConverter(String, String)public void addConverter(Class<?> targetClass, String converterClass)
jakarta.faces.application.ApplicationRegister a new converter class that is capable of performing conversions for the specified target class.
addConverter in class jakarta.faces.application.ApplicationtargetClass - The class for which this converter is registeredconverterClass - The fully qualified class name of the corresponding Converter implementationApplication.addConverter(Class, String)public jakarta.faces.convert.Converter<?> createConverter(String converterId)
jakarta.faces.application.Application
Instantiate and return a new Converter instance of the class
specified by a previous call to addConverter() for the specified converter id.
If the toLowerCase() of the String represenation of the value of the
"jakarta.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE" application configuration
parameter is "true" (without the quotes) and the Converter instance to be returned is an
instance of DateTimeConverter,
DateTimeConverter.setTimeZone(java.util.TimeZone) must be called, passing the return from
TimeZone.getDefault().
The argument converter must be inspected for the presence of the
ResourceDependency annotation. If the ResourceDependency annotation is
present, the action described in ResourceDependency must be taken. If the
ResourceDependency annotation is not present, the argument converter must be inspected for
the presence of the ResourceDependencies annotation. If the
ResourceDependencies annotation is present, the action described in ResourceDependencies
must be taken.
createConverter in class jakarta.faces.application.ApplicationconverterId - The converter id for which to create and return a new Converter instanceApplication.createConverter(String)public jakarta.faces.convert.Converter<?> createConverter(Class<?> targetClass)
jakarta.faces.application.Application
Instantiate and return a new Converter instance of the class that
has registered itself as capable of performing conversions for objects of the specified type. If no such
Converter class can be identified, return null.
To locate an appropriate Converter class, the following algorithm is performed, stopping as soon as an
appropriate Converter class is found:
Converter registered for the target class itself.Converter registered for interfaces that are implemented by the target class (directly or
indirectly).Converter registered for the superclass (if any) of the target class, recursively working up the
inheritance hierarchy.
If the Converter has a single argument constructor that accepts a Class, instantiate the
Converter using that constructor, passing the argument targetClass as the sole argument.
Otherwise, simply use the zero-argument constructor.
If the toLowerCase() of the String represenation of the value of the
"jakarta.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE" application configuration
parameter is "true" (without the quotes) and the Converter instance to be returned is an
instance of DateTimeConverter,
DateTimeConverter.setTimeZone(java.util.TimeZone) must be called, passing the return from
TimeZone.getDefault().
createConverter in class jakarta.faces.application.ApplicationtargetClass - Target class for which to return a ConverterApplication.createConverter(Class)public Iterator<String> getConverterIds()
jakarta.faces.application.Application
Return an Iterator over the set of currently registered converter ids for this Application.
getConverterIds in class jakarta.faces.application.ApplicationApplication.getConverterIds()public Iterator<Class<?>> getConverterTypes()
jakarta.faces.application.Application
Return an Iterator over the set of Class instances for which Converter classes have
been explicitly registered.
getConverterTypes in class jakarta.faces.application.ApplicationApplication.getConverterTypes()public void addValidator(String validatorId, String validatorClass)
jakarta.faces.application.Application
Register a new mapping of validator id to the name of the corresponding Validator class. This allows
subsequent calls to createValidator() to serve as a factory for Validator instances.
addValidator in class jakarta.faces.application.ApplicationvalidatorId - The validator id to be registeredvalidatorClass - The fully qualified class name of the corresponding Validator implementationApplication.addValidator(String, String)public jakarta.faces.validator.Validator<?> createValidator(String validatorId) throws jakarta.faces.FacesException
jakarta.faces.application.Application
Instantiate and return a new Validator instance of the class
specified by a previous call to addValidator() for the specified validator id.
The argument validator must be inspected for the presence of the
ResourceDependency annotation. If the ResourceDependency annotation is
present, the action described in ResourceDependency must be taken. If the
ResourceDependency annotation is not present, the argument validator must be inspected for
the presence of the ResourceDependencies annotation. If the
ResourceDependencies annotation is present, the action described in ResourceDependencies
must be taken.
createValidator in class jakarta.faces.application.ApplicationvalidatorId - The validator id for which to create and return a new Validator instancejakarta.faces.FacesException - if a Validator of the specified id cannot be createdApplication.createValidator(String)public Iterator<String> getValidatorIds()
jakarta.faces.application.Application
Return an Iterator over the set of currently registered validator ids for this Application.
getValidatorIds in class jakarta.faces.application.ApplicationApplication.getValidatorIds()public void addDefaultValidatorId(String validatorId)
jakarta.faces.application.Application
Register a validator by its id that is applied to all UIInput components in a view. The validator to
most often serve this role is the BeanValidator. The usage contract for this method assumes that the
validator has been registered using the normal “by-id” registration mechanism.
An implementation is provided that takes no action so that users that decorate the Application continue
to work.
addDefaultValidatorId in class jakarta.faces.application.ApplicationvalidatorId - the validator id.Application.addDefaultValidatorId(String)public Map<String,String> getDefaultValidatorInfo()
jakarta.faces.application.Application
Return an immutable Map over the set of currently registered default validator IDs and their class name
for this Application.
An implementation is provided that returns Collections.emptyMap so that users that decorate the
Application continue to work.
getDefaultValidatorInfo in class jakarta.faces.application.ApplicationApplication.getDefaultValidatorInfo()public jakarta.faces.application.ProjectStage getProjectStage()
jakarta.faces.application.Application
Return the project stage for the currently running application instance. The default value is
ProjectStage.Production
The implementation of this method must perform the following algorithm or an equivalent with the same end result to determine the value to return.
If the value has already been determined by a previous call to this method, simply return that value.
Look for a
JNDIenvironment entry under the key given by the value ofProjectStage.PROJECT_STAGE_JNDI_NAME(return type ofjava.lang.String). If found, continue with the algorithm below, otherwise, look for an entry in theinitParamMapof theExternalContextfrom the currentFacesContextwith the key given by the value ofProjectStage.PROJECT_STAGE_PARAM_NAMEIf a value is found, see if an enum constant can be obtained by calling
ProjectStage.valueOf(), passing the value from theinitParamMap. If this succeeds without exception, save the value and return it.If not found, or any of the previous attempts to discover the enum constant value have failed, log a descriptive error message, assign the value as
ProjectStage.Productionand return it.
A default implementation is provided that throws UnsupportedOperationException so that users that
decorate Application can continue to function
getProjectStage in class jakarta.faces.application.ApplicationApplication.getProjectStage()public jakarta.faces.component.search.SearchExpressionHandler getSearchExpressionHandler()
jakarta.faces.application.Application
Return the thread-safe singleton SearchExpressionHandler for this application.
getSearchExpressionHandler in class jakarta.faces.application.ApplicationSearchExpressionHandler.public void setSearchExpressionHandler(jakarta.faces.component.search.SearchExpressionHandler searchExpressionHandler)
jakarta.faces.application.Application
Set the SearchExpressionHandler instance used by the application.
setSearchExpressionHandler in class jakarta.faces.application.ApplicationsearchExpressionHandler - the SearchExpressionHandler.public void addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver resolver)
jakarta.faces.application.Application
Cause the argument resolver to be added to the head of the resolver chain.
It is not possible to remove a SearchKeywordResolver registered with this method, once it has been
registered.
The default implementation throws UnsupportedOperationException and is provided for the sole purpose of
not breaking existing applications that extend Application.
addSearchKeywordResolver in class jakarta.faces.application.Applicationresolver - the SearchKeywordResolver to add.public jakarta.faces.component.search.SearchKeywordResolver getSearchKeywordResolver()
jakarta.faces.application.Application
Return the singleton SearchKeywordResolver instance to be used for all search keyword resolution. This is
actually an instance of a composite SearchKeywordResolver that must contain the following
SearchKeywordResolver instances in the following order:
SearchKeywordResolver instances declared using the <search-keyword-resolver> element in the
application configuration resources.
Any SearchKeywordResolver instances added by calls to Application.addSearchKeywordResolver(jakarta.faces.component.search.SearchKeywordResolver).
The SearchKeywordResolver implementations for @all, @child(n),
@form, @id(...), @namingcontainer, @next, @none,
@parent, @previous, @root and @this.
The default implementation throws UnsupportedOperationException and is provided for the sole purpose of
not breaking existing applications that extend Application.
getSearchKeywordResolver in class jakarta.faces.application.ApplicationSearchKeywordResolver.@Deprecated public jakarta.faces.el.PropertyResolver getPropertyResolver()
jakarta.faces.application.Application
Return a PropertyResolver instance that wraps the ELResolver instance that Faces provides to the
Jakarta Expression Language for the resolution of expressions that appear programmatically in an application.
Note that this no longer returns the default PropertyResolver since that class is now a no-op that aids
in allowing custom PropertyResolvers to affect the EL resolution process.
getPropertyResolver in class jakarta.faces.application.ApplicationApplication.setPropertyResolver(jakarta.faces.el.PropertyResolver)@Deprecated public void setPropertyResolver(jakarta.faces.el.PropertyResolver resolver)
jakarta.faces.application.Application
Set the PropertyResolver instance that will be utilized to resolve method and value bindings.
This method is now deprecated but the implementation must cause the argument to be set as the head of the legacy
PropertyResolver chain, replacing any existing value that was set from the application configuration
resources.
It is illegal to call this method after the application has received any requests from the client. If an attempt is made to register a listener after that time it must have no effect.
setPropertyResolver in class jakarta.faces.application.Applicationresolver - The new PropertyResolver instanceApplication.setPropertyResolver(jakarta.faces.el.PropertyResolver)@Deprecated public jakarta.faces.el.MethodBinding createMethodBinding(String ref, Class<?>[] params)
jakarta.faces.application.Application
Call Application.getExpressionFactory() then call ExpressionFactory.createMethodExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class<?>, java.lang.Class<?>[]), passing the given
arguments, and wrap the result in a MethodBinding implementation, returning it.
createMethodBinding in class jakarta.faces.application.Applicationref - Method binding expression for which to return a MethodBinding instanceparams - Parameter signatures that must be compatible with those of the method to be invoked, or a zero-length
array or null for a method that takes no parametersApplication.createMethodBinding(String, Class[])@Deprecated public jakarta.faces.el.ValueBinding createValueBinding(String ref) throws jakarta.faces.el.ReferenceSyntaxException
jakarta.faces.application.Application
Call Application.getExpressionFactory() then call ExpressionFactory.createValueExpression(jakarta.el.ELContext, java.lang.String, java.lang.Class<?>), passing the argument
ref, Object.class for the expectedType, and null, for the fnMapper.
createValueBinding in class jakarta.faces.application.Applicationref - Value binding expression for which to return a ValueBinding instancejakarta.faces.el.ReferenceSyntaxException - if the specified ref has invalid syntaxApplication.createValueBinding(String)@Deprecated public jakarta.faces.el.VariableResolver getVariableResolver()
jakarta.faces.application.Application
Return the VariableResolver that wraps the ELResolver instance that Faces provides to the Jakarta
Expression Language for the resolution of expressions that appear programmatically in an application. The
implementation of the VariableResolvermust pass null as the base argument for any methods
invoked on the underlying ELResolver.
Note that this method no longer returns the default VariableResolver, since that class now is a no-op
that aids in allowing custom VariableResolvers to affect the Jakarta Expression Language resolution
process.
getVariableResolver in class jakarta.faces.application.ApplicationApplication.getVariableResolver()@Deprecated public void setVariableResolver(jakarta.faces.el.VariableResolver resolver)
jakarta.faces.application.Application
Set the VariableResolver instance that will be consulted to resolve method and value bindings.
This method is now deprecated but the implementation must cause the argument to be set as the head of the legacy
VariableResolver chain, replacing any existing value that was set from the application configuration
resources.
It is illegal to call this method after the application has received any requests from the client. If an attempt is made to register a listener after that time it must have no effect.
setVariableResolver in class jakarta.faces.application.Applicationresolver - The new VariableResolver instanceApplication.setVariableResolver(jakarta.faces.el.VariableResolver)Copyright © 2010–2022 JBoss by Red Hat. All rights reserved.