Tuesday, 1 February 2011

DelegatingVariableResolver

Spring provides a custom JavaServer Faces VariableResolver implementation that extends the standard Java Server Facesmanaged beans mechanism which lets you use JSF and Spring together. This variable resolver is called as DelegatingVariableResolver

It is a badly documented issue in Spring 2.5 ... 
Well, DelegatingVariableResolver is the way to integrate spring with JSF 1.1 by using a variable-resolver in faces-config.xml, like this:

HTML Code:
<application> 
  <variable-resolver> 
    org.springframework.web.jsf.DelegatingVariableResolver 
  </variable-resolver> 
</application>
But this is a deprecated method in JSF 1.2.

So, Spring 2.5 introduced a new way by using SpringBeanFacesELResolver like this:
HTML Code:
<application> 
  <el-resolver> 
org.springframework.web.jsf.el.SpringBeanFacesELResolver 
  </el-resolver> 
</application>

No comments:

Post a Comment