Eclipse autocomplete (content assist) with jsf2.0, xhtml and primefaces 2.2.RC1 [duplicate]
I use windows 7. I set the ClassPath like this:
D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-api.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\jsf-impl.jar;D:\EclipseProjects\DLFWD_NEW\WebContent\WEB-INF\lib\primefaces-2.2.RC1.jar
And I alse do this:
Window > Preferences > General > Content Types > Text > JSP > Add (xhtml)
But, it doesn't works.
When I use netbeans. I do nothing, but the autocomplete function works well.
First backup your project in other location.
Download Eclipse Helios and right click on the your Project, goto Properties go to Project Facets change the Configuration to JavaServer Faces 2.0 Project Apply.
Very easy: I have SpringSource Tool Suite 3.0.0 (Eclipse 4.2.0)
Project Properties > Project Facets
Check: JavaServer Faces. Version: 2.1
Push Link: Further configuration required...
Push Icon Button: Download library
Select: Apache MyFaces o Oracle Mojarra
Destination folder: I have my own /lib folder into my Project
Licence: ok
and Enjoy! Content Assist for h: f: and p:
Try to do this:
- In
package / project explorer
left-click on project folder. - Click on
Project Facets
voice on the left - In the right panel
Convert to faceted form...
should appear. If so, click on it, otherwise skip this step. - Set up properly your configuration and select
JavaServer Faces
.
Now you should have autocomplete for standard jsf and primefaces libraries.
Actually, you should add .xhtml
.
JSF 2.0 Facelets support is introduced in Helios (Eclipse 3.6). For older Eclipse versions, or for more advanced features such as EL autocomplete, you can always use the JBoss Tools plugin. If you're using Glassfish, the Glassfish Eclipse plugin also comes with a bit more advanced Facelets support.
精彩评论