6

I tried to activate EL proposals in a Facelets page, but when I hit Ctrl+Space, it doesn't work. I managed to activate JSF tag proposals thank to other questions, but EL proposals aren't working.

How can I activate this feature in Eclipse? Is it a known issue?

For example:

<h:inputHidden id="id" value="#{Ctrl+Space not working!}"/>
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555
M3rlino
  • 671
  • 1
  • 7
  • 20
  • 1
    Facelets (XHTML) is the successor of JSP. I believe you're talking about EL proposals instead of JSP proposals, right? I've fixed the terminology. – BalusC Jun 08 '11 at 11:55
  • A similar question was posted here: http://stackoverflow.com/questions/2136218/eclipse-autocomplete-content-assist-with-facelets-jsf-and-xhtml – maple_shaft Jun 08 '11 at 11:59
  • And here, for tag autocompletion: http://stackoverflow.com/questions/6204807/how-to-see-docs-for-jsf-facelets-elements-in-eclipse – BalusC Jun 08 '11 at 12:10
  • Thank you for correction! I was speaking about facelets in fact! I tried it and it works good. I noticed that Autocompletion is not working for facesContext.ctrl+space. Do you know if it is possible? – M3rlino Jun 08 '11 at 13:34
  • If you are interested in auto-complete for Spring beans, see: https://stackoverflow.com/questions/48933757/el-autocomplete-code-assist-with-eclipse-and-spring-beans – Thies Feb 22 '18 at 17:35

1 Answers1

7

Eclipse doesn't support this out the box. Even the support in JSP is very limited. Only the properties of <jsp:useBean> and managed beans hardcoded as <managed-bean> in faces-config.xml are available by autocomplete. There are however plugins which supports EL autocomplete on @ManagedBean and @Named beans.

For example, the JBoss Tools plugin (specifically the CDI feature) which can be installed as described here: How do I Install JBoss AS / WildFly Server in Eclipse for Java EE.

enter image description here

(which has in its current 3.2.0 version unicode bugs, as you see above in the rightmost window)

You can even use Ctrl+Click on the managed bean name #{bean} in an EL expression in Facelets file to navigate to the concrete backing bean class. You can also use Ctrl+Shift+G on the managed bean method in a backing bean class to find all references to the particular property or action in Facelets files.

The Aptana plugin is told to work fine for EL proposals in JSPs, but I am not sure for Facelets. I didn't had good experiences with installing and configuring the plugin for JSP some years ago.

See also:

Community
  • 1
  • 1
BalusC
  • 1,082,665
  • 372
  • 3,610
  • 3,555