After looking at JSF-SPRING and getting it to work with a basic project I added the IBM JSF nature to the project and BAM! JSF-SPRING no longer worked. Fortunately with a tip from IBM I found that the JSF-SPRING's VariableResolver was not returning properly. It was not returning the original variable resolver: original.resolveVariable(facesContext,name)(Variab le Resolver original). So I did a little looking around and read in "Core Java Server Faces" that it is necessary for any Variable-Resolver to return the "Original" VariableResolver if it is not able to resolve the variable.
Well, the JSF-SPRING Variable resolver is complex so I looked back at the Native Spring DelegatingVariableResolver and noticed that it did not Return the original VariableResolver either. So I modified the source code and compiled it and it still did not work. I looked around and noticed that the Class FacesContextUtils was listed as Abstract, which IBM did not seem to like because as soon as I got rid of the Abstract signature the Variable resolver worked. So I am not sure who could make these changes or what process it takes but the following two files need the following changes...
FacesContextUtils.java
Code:
public abstract class FacesContextUtils {
should be changed to:
Code:
public class FacesContextUtils {
DelegatingVariableResolver.java
Code:
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
// ask original resolver
................
}
return null;
}
should be changed to:
Code:
public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
// ask original resolver
................
}
return originalVariableResolver.resolveVariable(facesContext,name);;
}
As well, you could remove the code to ask the original VariableResolver because as I understand it the reason you must return the original VariableResolver is because these things chain together. Thus this would not be necessary but most likely explains why this would work unless someone tried to chain another VariableResolver on.(like IBM does)
Thanks and let me know if you have any more questions.