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!}"/>
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.
(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:
Properties of new tags using composite component are not displayed by Eclipse auto complete shortcurt
Related
I have installed Spring IDE 3.7.2 (Core + OSGi Extension), in Eclipse Mars SR1 Java EE.
I am writing blueprint bundles, and the tooling seams to work except for Beans Graph, who remains empty (with no errors in error log),
With a similar configuration for spring, the beans graph is displayed
After investigating this, it seems there is no org.springframework.beans.factory.xml.NamespaceHandler implementation provided for http://www.osgi.org/xmlns/blueprint/v1.0.0 namespace.
I manage to write a "quick and dirty" implementation based on one I found in eclipse gemini blueprint as a proof of concept
Is it something you could be interested in as a contribution ?
I am woriking on A maven Project.
the project run very well.
But when I see the marquers I found this problem.
EL Validator cannot run on project a because Validation Builder precedes JBoss Knowledge Base Builder.
do you have any idea ??
This is a eclipse project configuration problem. The validation builder is placed before the JBoss Tools Knowledge Base builder which collects the information for the validation builder. The validation builder should be the last one. Go to Project Properties -> JBoss Knowledge Base. Disable JBoss Tools Knowledge Base support there. Apply the changes. Enable JBoss Tools Knowledge Base support again. It will solve this problem.
Please report a bug to https://issues.jboss.org/browse/JBIDE if you can describe how to create such a broken project.
Alexey's answer didn't work for me. What I found worked was to delete the project from eclipse and re-import it.
I know this question was asked a lot of times, since I searched for hours for a solution, but it was never answered (or at least not for my situation).
I am using Wildfly 8.0 (ex JBoss), so I understand that I do not need to add jstl jars nor JSF jars since the implementation is already shipped with JBoss.
Now even when telling eclipse to use the Wildfly runtime libraries, I get the above error. I checked and the jboss-jstl-api_1.2_spec-1.0.4.Final.jar is part of the library
How can I get through this? I tried putting downloading jstl jars (from https://jstl.java.net/) and putting them in the lib directory but it is not working.
Copying the jars into "lib" works perfectly when I use Tomcat which doesn't have its jstl implementation. But not with Wildfly (maybe because eclipse ignores the jars I put in the lib directory since Wildfly has its own jars? But then why do I get the error in the first place? I am confused).
Thanks to anyone who could help me with this.
Edit: I forgot to precise that even with these errors on all my JSPs, the project builds and works perfectly on the server.
These errors are eclipse specific, it does not recognize the taglibs and displays annoying error messages at taglib declarations and warnings when using these (unknown to eclipse) tags. Plus, I can't use code completion.
Edit: I bypassed the problem, for the moment, by adding standalone myfaces and jstl libraries to the build path. I would like though that eclipse uses the jars available on server side. (For JPA for example I did not need to add the hibernate library to the build path, I simply told eclipse that the JPA implementation si available on server runtime and it worked fine with code completion and everything).
Alright, to not have to add any additional libraries (that are not needed by the server) here's what I had to do in addition to adding the Wildfly runtime library to the project:
Go to Project/Properties/Project Facets/Java Server Faces and chose Library Provided by Target Runtime in the library type (instead of a User Library).
I'm truly disappointed JSF support in eclipse. I'm encountering such caveats all the time.
I'm using JBoss 7.1.1 and even adding JBoss as the Target Runtime of the project didn't help.
The only solution that worked for me, was to define new JSF library inside Eclipse: Window Preferences -> Java -> Build Path -> User Libraries -> click New (pointing to the jsf-impl.jar and jsf-api.jar). And then adding such library to the build path of the project.
It solved all annoying eclipse errors can not find tag library. So it is pretty similar to the #Riccatti first solution.
Btw: answer which I found on the eclipse forum says that this error is usually caused by not existing JSF tag libraries (that are present in jsf-impl.jar) on the classpath.
i am getting this warning in eclipse:
Validator id is not registered
on the line:
<f:validator validatorId="confirmPasswordValidator" />
i am using JSF 2, and tomcat 6
and my el-impl library is org.glassfish.web
any ideas why ?
and how to solve it ?
Ignore and run it. Eclipse is relying on it being present as <validator> declaration in faces-config.xml the JSF 1.x way. It does by default not recognize #FacesValidator and likes yet and therefore don't see it already being registered by new JSF 2.x annotations. The upcoming newer Eclipse versions will.
You could consider to turn off JSF validation in Eclipse preferences, it will only lead to more confusion and annoyances. The upcoming JBoss Tools plugin 3.3 (currently still in beta) will support JSF annotations like #FacesValidator, #ManagedBean, etc.
Note that this is in no way related to EL. You aren't using #{} anywhere.
I'm using Eclipse Java EE IDE (Galileo) with seam framework. I'm interested how to enable ctrl-click to jump from an EL to a java module (in jsf views)?
Eclipse does recognize ctrl-click in JSF EL, such binding is defined in General>Editors>Text Editors>Hyperlinking. You will be able to use it only on variables defined in faces-config, so those are bound to the Classes before runtime. Am i wrong?