Can I use multiple EL resolvers in JSF 2.0?

I would like to know about EL-resolvers in JSF. Can we use several EL resolvers in a project ?. Say, if I use Spring DelegatingVariableResolver , can I add another EL resolver like Seam SeamELResolver ?

My expectation is DelegatingVariableResolver delegate to another EL recognizer when it receives an error or exception during the translation process.

+4
source share
1 answer

DelegatingVariableResolver is deprecated since Spring 3.2, then yes, you can declare several ElResolver as:

 <application> <el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver> <el-resolver>com.agitech.erp.bean.BeanResolver</el-resolver> <locale-config> <default-locale>fr</default-locale> </locale-config> </application> public class BeanResolver extends javax.el.ELResolver { ........ } 

if you use MyFaces, you can choose a way to organize custom transformers using

 <context-param> <param-name>org.apache.myfaces.EL_RESOLVER_COMPARATOR</param-name> <param-value>org.apache.myfaces.el.unified.CustomLastELResolverComparator</param-value> </context-param> 
0
source

Source: https://habr.com/ru/post/1439731/


All Articles