Imagine the case where you have a JSF application that’s already using some custom ELResolver, but you want to get all the benefits of spring and want to have the SpringBeanFacesELResolver. Well, it’s rather simple:
public class MyCompositeELResolver extends javax.el.CompositeELResolver
public class MyCompositeELREsolver() {
add(new YourCustomELResolver());
add(new SpringBeanFacesELResolver());
}
}
Note that the resolvers are ‘consulted’ in the order they are added.
Now just define your newly created composite resolver as in faces-config.xml.
Advertisement