Method from javax.faces.application.Application Detail: |
public void addBehavior(String behaviorId,
String behaviorClass) {
}
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.
|
abstract public void addComponent(String componentType,
String componentClass)
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.
|
abstract public void addConverter(String converterId,
String converterClass)
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.
|
abstract public void addConverter(Class<?> targetClass,
String converterClass)
Register a new converter class that is capable of performing
conversions for the specified target class.
|
public void addDefaultValidatorId(String validatorId) {
if (defaultApplication != null) {
defaultApplication.addDefaultValidatorId(validatorId);
}
}
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.
|
public void addELContextListener(ELContextListener listener) {
if (defaultApplication != null) {
defaultApplication.addELContextListener(listener);
} else {
throw new UnsupportedOperationException();
}
}
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.
|
public void addELResolver(ELResolver resolver) {
if (defaultApplication != null) {
defaultApplication.addELResolver(resolver);
} else {
throw new UnsupportedOperationException();
}
}
Cause an the argument resolver to be added to the
resolver chain as specified in section JSF.5.5.1 of the JavaServer
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 JSP container to optimize for the common
case where no additional ELResolver s are in the
chain, aside from the standard ones. It is permissible to add
ELResolver s 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 .
|
abstract public void addValidator(String validatorId,
String validatorClass)
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.
|
public Behavior createBehavior(String behaviorId) throws FacesException {
return null;
}
Instantiate and
return a new Behavior instance of the class specified by
a previous call to addBehavior() for the specified
behavior id.
|
abstract public UIComponent createComponent(String componentType) throws FacesException
|
public UIComponent createComponent(FacesContext context,
Resource componentResource) {
if (defaultApplication != null) {
return defaultApplication.createComponent(context,
componentResource);
}
throw new UnsupportedOperationException();
}
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 ,
passing the viewId found by calling
javax.faces.component.UIViewRoot#getViewId on the
javax.faces.component.UIViewRoot in the argument
FacesContext .
Obtain a reference to the composite component
metadata for this composite component by calling ViewDeclarationLanguage#getComponentMetadata , passing the
facesContext and componentResource
arguments to this method. This version of JSF specification
uses JavaBeans as the API to the component metadata.
Determine if the component author declared a
component-type 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 #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 . If the
result is non-null , and is a script written in
one of the languages listed in JSF.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 #createComponent(java.lang.String) passing
"javax.faces.NamingContainer " as the
argument.
Call UIComponent#setRendererType on the
UIComponent instance, passing
"javax.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 javax.faces.event.ListenerFor annotation. If this annotation is
present, the action listed in javax.faces.event.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.
|
abstract public UIComponent createComponent(ValueBinding componentBinding,
FacesContext context,
String componentType) throws FacesExceptionDeprecated! This - has been replaced by #createComponent(javax.el.ValueExpression,javax.faces.context.FacesContext,java.lang.String) .
|
public UIComponent createComponent(ValueExpression componentExpression,
FacesContext context,
String componentType) throws FacesException {
if (defaultApplication != null) {
return defaultApplication.createComponent(componentExpression,
context,
componentType);
}
throw new UnsupportedOperationException();
}
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 javax.faces.event.ListenerFor (or javax.faces.event.ListenersFor ) or ResourceDependency
(or ResourceDependencies ) annotation. If any of these
annotations are present, the action listed in javax.faces.event.ListenerFor or ResourceDependency must
be taken on the component, before it is returned from this
method. This variant of createComponent must
not inspect the javax.faces.render.Renderer for the component to be returned for
any of the afore mentioned annotations. Such inspection is the
province of #createComponent(ValueExpression,
FacesContext, String, String) or #createComponent(FacesContext, String, String) .
|
public UIComponent createComponent(FacesContext context,
String componentType,
String rendererType) {
if (defaultApplication != null) {
return defaultApplication.createComponent(context,
componentType,
rendererType);
}
throw new UnsupportedOperationException();
}
|
public UIComponent createComponent(ValueExpression componentExpression,
FacesContext context,
String componentType,
String rendererType) {
if (defaultApplication != null) {
return defaultApplication.createComponent(componentExpression,
context,
componentType,
rendererType);
}
throw new UnsupportedOperationException();
}
|
abstract public 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.
If the toLowerCase() of
the String represenation of the value of the
"javax.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 javax.faces.convert.DateTimeConverter , javax.faces.convert.DateTimeConverter#setTimeZone must be
called, passing the return from
TimeZone.getDefault() .
The argument
converter must be inspected for the presence of the
javax.faces.application.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 javax.faces.application.ResourceDependencies annotation.
If the ResourceDependencies annotation
is present, the action described in ResourceDependencies
must be taken.
|
abstract public 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. 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:
- Locate a Converter registered for the target class itself.
- Locate a Converter registered for interfaces that are
implemented by the target class (directly or indirectly).
- Locate a 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
"javax.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 javax.faces.convert.DateTimeConverter , javax.faces.convert.DateTimeConverter#setTimeZone must be
called, passing the return from
TimeZone.getDefault() .
|
abstract public MethodBinding createMethodBinding(String ref,
Class<?>[] params) throws ReferenceSyntaxExceptionDeprecated! This - has been replaced by calling #getExpressionFactory then ExpressionFactory#createMethodExpression .
|
abstract public Validator createValidator(String validatorId) throws FacesException
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
javax.faces.application.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 javax.faces.application.ResourceDependencies annotation.
If the ResourceDependencies annotation
is present, the action described in ResourceDependencies
must be taken.
|
abstract public ValueBinding createValueBinding(String ref) throws ReferenceSyntaxExceptionDeprecated! This - has been replaced by calling #getExpressionFactory then ExpressionFactory#createValueExpression .
|
public T evaluateExpressionGet(FacesContext context,
String expression,
Class<? extends T> expectedType) throws ELException {
if (defaultApplication != null) {
return defaultApplication.evaluateExpressionGet(context,
expression,
expectedType);
}
throw new UnsupportedOperationException();
}
|
abstract public ActionListener getActionListener()
Return the default ActionListener to be registered for
all javax.faces.component.ActionSource components in this
appication. If not explicitly set, a default implementation must
be provided that performs the
following functions:
- The
processAction() method must first call
FacesContext.renderResponse() in order to bypass
any intervening lifecycle phases, once the method returns.
- The
processAction() method must next determine
the logical outcome of this event, as follows:
- If the originating component has a non-
null
action property, retrieve the MethodBinding from the property, and call
invoke() on it. Convert the returned value (if
any) to a String, and use it as the logical outcome.
- Otherwise, the logical outcome is
null .
- The
processAction() method must finally retrieve
the NavigationHandler instance for this
application and call NavigationHandler#handleNavigation passing:
- the FacesContext for the current request
- If there is a
MethodBinding instance for the
action property of this component, the result of
calling MethodBinding#getExpressionString on it, null
otherwise
- the logical outcome as determined above
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 javax.faces.component.ActionSource2 , and only implement javax.faces.component.ActionSource .
|
public Iterator<String> getBehaviorIds() {
return Collections.EMPTY_LIST.iterator();
}
|
abstract public Iterator<String> getComponentTypes()
|
abstract public Iterator<String> getConverterIds()
|
abstract public Iterator<?> getConverterTypes()
Return an Iterator over the set of Class
instances for which Converter classes have been explicitly
registered.
|
abstract public Locale getDefaultLocale()
Return the default Locale for this application. If
not explicitly set, null is returned.
|
abstract public String getDefaultRenderKitId()
Return the renderKitId to be used for rendering
this application. If not explicitly set, null is
returned.
|
public Map<String, String> getDefaultValidatorInfo() {
if (defaultApplication != null) {
return defaultApplication.getDefaultValidatorInfo();
}
return Collections.emptyMap();
}
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.
|
public ELContextListener[] getELContextListeners() {
if (defaultApplication != null) {
return defaultApplication.getELContextListeners();
}
throw new UnsupportedOperationException();
}
If no calls have been made to #addELContextListener ,
this method must return an empty array.
Otherwise, return an array representing the list of listeners
added by calls to #addELContextListener .
An implementation is provided that throws
UnsupportedOperationException so that users that decorate
the Application continue to work.
|
public ELResolver getELResolver() {
if (defaultApplication != null) {
return defaultApplication.getELResolver();
}
throw new UnsupportedOperationException();
}
Return the singleton ELResolver instance to be used
for all EL resolution. This is actually an instance of javax.el.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 JSF.5 in the spec
document.
An implementation that wraps the head of
the legacy PropertyResolver chain, as per section
PropertyResolver ChainWrapper in Chapter JSF.5 in the spec
document.
Any ELResolver instances added by calls to
#addELResolver .
The default implementation throws UnsupportedOperationException
and is provided for the sole purpose of not breaking existing applications
that extend Application .
|
public ExpressionFactory getExpressionFactory() {
if (defaultApplication != null) {
return defaultApplication.getExpressionFactory();
}
throw new UnsupportedOperationException();
}
Return the ExpressionFactory instance for this
application. This instance is used by the convenience method
#evaluateExpressionGet .
The implementation must return the
ExpressionFactory from the JSP 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.
|
abstract public String getMessageBundle()
Return the fully qualified class name of the
ResourceBundle to be used for JavaServer Faces messages
for this application. If not explicitly set, null
is returned.
|
abstract public NavigationHandler getNavigationHandler()
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.
|
public ProjectStage getProjectStage() {
if (defaultApplication != null) {
return defaultApplication.getProjectStage();
}
return ProjectStage.Production;
}
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 JNDI environment entry under the key
given by the value of ProjectStage#PROJECT_STAGE_JNDI_NAME (return type of
java.lang.String ). If found, continue with the
algorithm below, otherwise, look for an entry in the
initParamMap of the ExternalContext
from the current FacesContext with the key given by
the value of ProjectStage#PROJECT_STAGE_PARAM_NAME
If a value is found, see if an enum constant can be
obtained by calling ProjectStage.valueOf() , passing
the value from the initParamMap . 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.Production and
return it.
A default implementation is provided
that throws UnsupportedOperationException so that
users that decorate Application can continue to
function .
|
abstract public PropertyResolver getPropertyResolver()Deprecated! This - has been replaced by #getELResolver .
Return a PropertyResolver instance that wraps the
ELResolver instance that Faces provides to the unified EL
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 PropertyResolver s to
affect the EL resolution process.
|
public ResourceBundle getResourceBundle(FacesContext ctx,
String name) {
if (defaultApplication != null) {
return defaultApplication.getResourceBundle(ctx, name);
}
throw new UnsupportedOperationException();
}
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 javax.faces.component.UIViewRoot .
The default implementation throws
UnsupportedOperationException and is provided
for the sole purpose of not breaking existing applications that extend
this class.
|
public ResourceHandler getResourceHandler() {
if (defaultApplication != null) {
return defaultApplication.getResourceHandler();
}
throw new UnsupportedOperationException();
}
Return the singleton, stateless, thread-safe ResourceHandler for this application. The JSF implementation
must support the following techniques for declaring an alternate
implementation of ResourceHandler .
In all of the above cases, the runtime must employ the
decorator pattern as for every other pluggable artifact in
JSF.
A default implementation is provided
that throws UnsupportedOperationException so that
users that decorate Application can continue to
function .
|
abstract public StateManager getStateManager()
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 JavaServer Faces Specification.
|
abstract public Iterator<Locale> getSupportedLocales()
|
abstract public Iterator<String> getValidatorIds()
|
abstract public VariableResolver getVariableResolver()Deprecated! This - has been replaced by #getELResolver .
Return the VariableResolver that wraps the ELResolver instance that Faces provides to the unified EL for
the resolution of expressions that appear programmatically in an
application. The implementation of the
VariableResolver must 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 VariableResolver s to
affect the EL resolution process.
|
abstract public ViewHandler getViewHandler()
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
JavaServer Faces Specification.
|
public void publishEvent(FacesContext context,
Class<SystemEvent> systemEventClass,
Object source) {
if (defaultApplication != null) {
defaultApplication.publishEvent(context, systemEventClass, source);
} else {
throw new UnsupportedOperationException();
}
}
If javax.faces.context.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
#subscribeToEvent regarding the storage and retrieval of
listener instances. Specifically, if #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 #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() ,
#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 javax.faces.event.SystemEventListenerHolder , call javax.faces.event.SystemEventListenerHolder#getListenersForEventClass
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 #subscribeToEvent(Class, Class,
javax.faces.event.SystemEventListener) on the javax.faces.component.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 #subscribeToEvent(Class, Class,
javax.faces.event.SystemEventListener) , perform algorithm
traverseListenerList on the list.
If any Application level listeners have
been installed by previous calls to #subscribeToEvent(Class, javax.faces.event.SystemEventListener) ,
perform algorithm traverseListenerList on the
list.
If the act of invoking the processListener method
causes an javax.faces.event.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,
A default implementation is provided
that throws UnsupportedOperationException so that
users that decorate Application can continue to
function .
|
public void publishEvent(FacesContext context,
Class<SystemEvent> systemEventClass,
Class<?> sourceBaseType,
Object source) {
if (defaultApplication != null) {
defaultApplication.publishEvent(context,
systemEventClass,
sourceBaseType,
source);
} else {
throw new UnsupportedOperationException();
}
}
This method functions exactly like
#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 .
|
public void removeELContextListener(ELContextListener listener) {
if (defaultApplication != null) {
defaultApplication.removeELContextListener(listener);
} else {
throw new UnsupportedOperationException();
}
}
Remove the argument listener from the list of
ELContextListener s. 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.
|
abstract public void setActionListener(ActionListener listener)
|
abstract public void setDefaultLocale(Locale locale)
|
abstract public void setDefaultRenderKitId(String renderKitId)
Set the renderKitId to be used to render this
application. Unless the client has provided a custom ViewHandler
that supports the use of multiple javax.faces.render.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.
|
abstract public void setMessageBundle(String bundle)
Set the fully qualified class name of the ResourceBundle
to be used for JavaServer Faces messages for this application. See the
JavaDocs for the java.util.ResourceBundle class for more
information about the syntax for resource bundle names.
|
abstract public void setNavigationHandler(NavigationHandler handler)
Set the NavigationHandler instance that will be passed
the outcome returned by any invoked application action for this
web application.
|
abstract public void setPropertyResolver(PropertyResolver resolver)Deprecated! The - recommended way to affect the execution of the EL
is to provide an <el-resolver> element at the
right place in the application configuration resources which will
be considered in the normal course of expression evaluation.
This method now will cause the argument resolver to
be wrapped inside an implementation of ELResolver and
exposed to the EL resolution system as if the user had called
#addELResolver .
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.
|
public void setResourceHandler(ResourceHandler resourceHandler) {
if (defaultApplication != null) {
defaultApplication.setResourceHandler(resourceHandler);
} else {
throw new UnsupportedOperationException();
}
}
Set the ResourceHandler instance that will be utilized
for rendering the markup for resources, and for satisfying client
requests to serve up resources.
|
abstract public void setStateManager(StateManager manager)
Set the StateManager instance that will be utilized
during the Restore View and Render Response
phases of the request processing lifecycle.
|
abstract public void setSupportedLocales(Collection<Locale> locales)
|
abstract public void setVariableResolver(VariableResolver resolver)Deprecated! The - recommended way to affect the execution of the EL
is to provide an <el-resolver> element at the
right place in the application configuration resources which will
be considered in the normal course of expression evaluation.
This method now will cause the argument resolver to
be wrapped inside an implementation of ELResolver and
exposed to the EL resolution system as if the user had called
#addELResolver .
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.
|
abstract public void setViewHandler(ViewHandler handler)
Set the ViewHandler instance that will be utilized
during the Restore View and Render Response
phases of the request processing lifecycle.
|
public void subscribeToEvent(Class<SystemEvent> systemEventClass,
SystemEventListener listener) {
if (defaultApplication != null) {
defaultApplication.subscribeToEvent(systemEventClass, listener);
} else {
throw new UnsupportedOperationException();
}
}
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 #subscribeToEvent(Class, Class,
javax.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 .
|
public void subscribeToEvent(Class<SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener) {
if (defaultApplication != null) {
defaultApplication.subscribeToEvent(systemEventClass,
sourceClass,
listener);
} else {
throw new UnsupportedOperationException();
}
}
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 #publishEvent 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 #publishEvent given only systemEventClass .
|
public void unsubscribeFromEvent(Class<SystemEvent> systemEventClass,
SystemEventListener listener) {
if (defaultApplication != null) {
defaultApplication.unsubscribeFromEvent(systemEventClass, listener);
} else {
throw new UnsupportedOperationException();
}
}
|
public void unsubscribeFromEvent(Class<SystemEvent> systemEventClass,
Class<?> sourceClass,
SystemEventListener listener) {
if (defaultApplication != null) {
defaultApplication.unsubscribeFromEvent(systemEventClass,
sourceClass,
listener);
} else {
throw new UnsupportedOperationException();
}
}
|