|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.el.VariableResolver
org.springframework.web.jsf.VariableResolverImpl
VariableResolver implementation that builds up a
WebApplicationContext using the inner
class VariableResolverImpl.FacesWebApplicationContext based on the
typical faces configuration files:
/WEB-INF/faces-config.xml/META-INF/faces-config.xmlFacesServlet.CONFIG_FILES_ATTR
for a comma delimited list of context relative resource path.
This class trys to encapsulate the original JSF VariableResolver of the JSF implementation used with the following strategy:
FactoryFinderweb.xml-file under the context initialization
parameter org.springframework.web.jsf.VARIABLE_RESOLVER_CLASS
The FacesWebApplicationContext delegates to the appropiate VariableResolver
for bean-creation.
The resolveVariable(FacesContext, String) method of this class implements the following
strategy:
FacesWebApplicationContext contains the bean and returns itresolveVariable method of the original VariableResolver
if the context does not contain the bean
This implementation trys to load a parent Spring context for the FacesWebApplicationContext
in such a manner described in ContextLoader.
The FacesWebApplicationContext supports all the features described in
WebApplicationContext, e.g.:
FactoryBean supportApplicationListener supportMessageSource supportFacesWebApplicationContext supports non-singleton FactoryBeansMessageSourceapplication scope defined in the faces configuration file in the "managed-bean-scope" tag is interpreted as singleton<application> <variable-resolver>org.springframework.web.jsf.VariableResolverImpl</variable-resolver> </application>
WebApplicationContext| Nested Class Summary | |
protected class |
VariableResolverImpl.FacesListableBeanFactory
ConfigurableListableBeanFactory implementation
used as internal bean factory for the VariableResolverImpl.FacesWebApplicationContext.
|
protected class |
VariableResolverImpl.FacesWebApplicationContext
WebApplicationContext implementation that takes configuration from a
faces configuration XML document. |
| Field Summary | |
protected org.apache.commons.logging.Log |
logger
|
static java.lang.String |
VARIABLE_RESOLVER_PARAM
|
| Constructor Summary | |
VariableResolverImpl()
Default constructor. |
|
| Method Summary | |
protected java.lang.String |
configLocations(javax.servlet.ServletContext servletContext)
Returns a comma delimited String with the faces configuration files resources |
protected VariableResolverImpl.FacesWebApplicationContext |
createFacesWebApplicationContext(javax.servlet.ServletContext servletContext,
ApplicationContext parent)
Creates and return a VariableResolverImpl.FacesWebApplicationContext. |
protected void |
finalize()
Closes the faces WebApplicationContext. |
protected ApplicationContext |
loadParentContext(javax.servlet.ServletContext context)
Loads and returns a root parent application context for the VariableResolverImpl.FacesWebApplicationContext
(usually a xml context based on the "spring-beans" DTD). |
java.lang.Object |
resolveVariable(FacesContext context,
java.lang.String name)
Checks wether there is a bean with name name in the VariableResolverImpl.FacesWebApplicationContext
and returns it. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String VARIABLE_RESOLVER_PARAM
protected final org.apache.commons.logging.Log logger
| Constructor Detail |
public VariableResolverImpl()
| Method Detail |
protected void finalize()
throws java.lang.Throwable
WebApplicationContext.
ApplicationContextException - if there were fatal errors closing the ApplicationContext
java.lang.Throwable
public java.lang.Object resolveVariable(FacesContext context,
java.lang.String name)
throws EvaluationException
name in the VariableResolverImpl.FacesWebApplicationContext
and returns it. Otherwise delegates to the encapsulated original VariableResolver.
context - context against which to resolve the bean namename - name of the bean to be resolved
EvaluationException - if an exception is thrown while resolving the variable name
java.lang.NullPointerException - if context or name is nullVariableResolver.resolveVariable(javax.faces.context.FacesContext, java.lang.String),
VariableResolverImpl.FacesWebApplicationContext
protected VariableResolverImpl.FacesWebApplicationContext createFacesWebApplicationContext(javax.servlet.ServletContext servletContext,
ApplicationContext parent)
throws BeansException
VariableResolverImpl.FacesWebApplicationContext.
servletContext - parent - parent application context
BeansExceptionprotected java.lang.String configLocations(javax.servlet.ServletContext servletContext)
protected ApplicationContext loadParentContext(javax.servlet.ServletContext context)
throws BeansException
VariableResolverImpl.FacesWebApplicationContext
(usually a xml context based on the "spring-beans" DTD).
BeansExceptionContextLoader
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||