2
votes

in one of my projects I have to use JSF with a Spring backend. I use the org.springframework.web.jsf.el.SpringBeanFacesELResolver to resolve the el-expressions in JSF to the Spring beans. Everything works fine except that Intellij 13 does not link the el-expressions to my beans. There is also no autocompletion available. It is really annoying if you have to type or copy/paste all the keys into your JSF pages.

Does someone know a solution for my problem?

1
Does this help?ChiefTwoPencils
That's for JSP, not JSF.BalusC
How your project is structured?GUISSOUMA Issam
It is a maven project with a parent and a webapp modul. The parent is only for dependency management. My webapp uses spring beans in the backend and I inject them with el expressions from jsf.Henok
I use IntelliJ IDEA 14 with similar setup on one project and the autocompletion and navigate to bean works just fine. Not sure if it is a new feature in 14, but I guess not. Do you have Spring facet configured in the project structure?Bohuslav Burghardt

1 Answers

1
votes

Using the @elvariable tag in JSF forces Intellij to resolve the classes used:

<!--@elvariable id="model" type="com.package.Model"-->
<!--@elvariable id="item" type="com.package.entity.Item"-->
<rich:dataTable value="#{model}" var="item">
...
</rich:dataTable>

This gives you autocomplete and warnings when methods aren't available.