java.lang.Object | |||
↳ | ELResolver | ||
↳ | org.springframework.beans.factory.access.el.SpringBeanELResolver | ||
↳ | org.springframework.web.jsf.el.SpringBeanFacesELResolver |
JSF 1.2 ELResolver
that delegates to the Spring root
WebApplicationContext
, resolving name references to
Spring-defined beans.
Configure this resolver in your faces-config.xml
file as follows:
<application> ... <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> </application>All your JSF expressions can then implicitly refer to the names of Spring-managed service layer beans, for example in property values of JSF-managed beans:
<managed-bean> <managed-bean-name>myJsfManagedBean</managed-bean-name> <managed-bean-class>example.MyJsfManagedBean</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>mySpringManagedBusinessObject</property-name> <value>#{mySpringManagedBusinessObject}</value> </managed-property> </managed-bean>with "mySpringManagedBusinessObject" defined as Spring bean in applicationContext.xml:
<bean id="mySpringManagedBusinessObject" class="example.MySpringManagedBusinessObject"> ... </bean>
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.beans.factory.access.el.SpringBeanELResolver
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This implementation delegates to
getWebApplicationContext(ELContext) . | |||||||||||
Retrieve the web application context to delegate bean name resolution to.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.beans.factory.access.el.SpringBeanELResolver
| |||||||||||
From class
java.lang.Object
|
This implementation delegates to getWebApplicationContext(ELContext)
.
Can be overridden to provide an arbitrary BeanFactory reference to resolve
against; usually, this will be a full Spring ApplicationContext.
elContext | the current JSF ELContext |
---|
null
)
Retrieve the web application context to delegate bean name resolution to.
The default implementation delegates to FacesContextUtils.
elContext | the current JSF ELContext |
---|
null
)