Ecplise autocomplete primefaces tags [duplicate]

时光毁灭记忆、已成空白 提交于 2019-12-04 00:32:44

问题


I am using Eclipse to work with PrimeFaces like this:

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
 xmlns:ui="http://java.sun.com/jsf/facelets"
 xmlns:h="http://java.sun.com/jsf/html"
 xmlns:f="http://java.sun.com/jsf/core"
 xmlns:p="http://primefaces.prime.com.tr/ui" 
 template="/template/ui.xhtml">

I saw Bozho question and answer.

So it works for me only for h and f tags and not for p (primefaces) tag! How can it autocomplete primefaces tag?


回答1:


I've blogged about Helios support, that might help;

http://cagataycivici.wordpress.com/2010/08/31/primefaces-support-in-eclipse-helios/




回答2:


I had the same problem and none of the solutions posted solved (i already had primefaces jar in my classpath).

I use a eclipse project format, and in the .settings folder, the file "org.eclipse.wst.common.project.facet.core.xml" had this properties:

<installed facet="jst.jsf" version="1.2"/>
<installed facet="jst.web" version="2.5"/>

I changed to:

<installed facet="jst.jsf" version="2.0"/>
<installed facet="jst.web" version="3.0"/>

And it worked. Sure it was a wrong configuration, but can be useful to someone. Ps: these properties can be changed in project facets on eclipse project properties, but in some cases it´s better change directly in the file.




回答3:


By default we don't get automcomplete for PrimeFaces tag in Eclipse. To enable AutoComplete, Go to Window-->Preferences-->General-->ContentTypes Select JSP and add .xhtml as file association.



来源:https://stackoverflow.com/questions/4060600/ecplise-autocomplete-primefaces-tags

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!