2

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?

Henok
  • 413
  • 2
  • 7
  • 20
  • Does [this](http://stackoverflow.com/questions/12694392/intellij-not-resolving-el-variables-within-jsp-code-inspection-or-autocomplete) help? – ChiefTwoPencils Sep 04 '15 at 09:01
  • That's for JSP, not JSF. – BalusC Sep 04 '15 at 09:46
  • How your project is structured? – GUISSOUMA Issam Sep 04 '15 at 10:17
  • 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 Sep 04 '15 at 12:40
  • 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 Sep 04 '15 at 17:03
  • Ok maybe it is a problem of Version 13, but we have only licenses for Intellij 13 in our company. – Henok Sep 09 '15 at 11:45

1 Answers1

1

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.

Sam
  • 670
  • 1
  • 6
  • 20