I'd like to enable code completion for facelets + JSF 1.2 in NetBeans 6.8. I'd prefer to enable it for a free-form project that I build using my own Ant build.xml, but I see no options to enable that, so I'm willing to go with a "Web Application with Existing Sources".
Sorry for all of the screen-shots. I just want to show what I did.
Project Setup
Project Configuration
After setup and configuration, code-completion within facelets still doesn't work.
Am I missing something? Am I going about this in the wrong way?
Solution
Here's what I ended up doing:
- I switched from a Standard Java project to a Web project (duh!)
- I took Awano's advice and switched the MIME type for xhtml files back to text/xhtml.
- I added the tld file from the facelets site to the meta-inf directory in the jsf-facelets.jar and included it in my project.
I added the rendered attribute to the fragment tag in the jsf-ui.tld file. It was missing for some reason:
<attribute> <name>rendered</name> <required>false</required> <rtexprvalue>false</rtexprvalue> <description>Renders the contents of this tag if the attribute resolves to true.</description> </attribute>
*.xhtml
files with the JSP editor (which by default only runs on*.jsp
,*.jspx
and so on). See if similar setting exist in Netbeans. Good luck. – BalusC