| org.springframework.web.jsf.el.SpringBeanFacesELResolver
SpringBeanFacesELResolver | public class SpringBeanFacesELResolver extends ELResolver (Code) | | 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.DelegatingFacesELResolver</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>
author: Juergen Hoeller since: 2.5 See Also: org.springframework.web.jsf.WebApplicationContextVariableResolver See Also: org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext |
Field Summary | |
final protected Log | logger |
Method Summary | |
protected BeanFactory | getBeanFactory(ELContext elContext) Retrieve the Spring BeanFactory to delegate bean name resolution to. | public Class> | getCommonPropertyType(ELContext elContext, Object base) | public Iterator<FeatureDescriptor> | getFeatureDescriptors(ELContext elContext, Object base) | public Class> | getType(ELContext elContext, Object base, Object property) | public Object | getValue(ELContext elContext, Object base, Object property) | protected WebApplicationContext | getWebApplicationContext(ELContext elContext) Retrieve the web application context to delegate bean name resolution to. | public boolean | isReadOnly(ELContext elContext, Object base, Object property) | public void | setValue(ELContext elContext, Object base, Object property, Object value) |
logger | final protected Log logger(Code) | | Logger available to subclasses
|
getBeanFactory | protected BeanFactory getBeanFactory(ELContext elContext)(Code) | | Retrieve the Spring BeanFactory to delegate bean name resolution to.
The default implementation delegates to getWebApplicationContext .
Can be overridden to provide an arbitrary BeanFactory reference to resolve
against; usually, this will be a full Spring ApplicationContext.
Parameters: elContext - the current JSF ELContext the Spring BeanFactory (never null ) See Also: SpringBeanFacesELResolver.getWebApplicationContext |
getCommonPropertyType | public Class> getCommonPropertyType(ELContext elContext, Object base)(Code) | | |
isReadOnly | public boolean isReadOnly(ELContext elContext, Object base, Object property) throws ELException(Code) | | |
|
|