How to enable code completion in Netbeans 6.8 for facelets in JSF 1.2?

I want to enable code completion for facelets + JSF 1.2 in NetBeans 6.8. I would prefer to enable it for a free form project that I create using my own Ant build.xml, but I donโ€™t see any options to enable it, so Iโ€™m ready to go with a "web application with existing sources". "

Sorry for all the screenshots. I just want to show what I did.

Project setup

Choose a project dialog

Name & Location dialog

Server & Settings dialog

Existing Sources & Libraries dialog

Project configuration Frameworks dialog with Libraries tab selected

Frameworks dialog with Configuration tab selected

After setting up and configuring code completion in feeds, it still doesn't work.
Showing editor with failed code-completion

Am I missing something? Am I going about it wrong?

Decision

Here is 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 website to the meta-inf directory in jsf-facelets.jar and included it in my project.
  • I added the rendered attribute to the fragment tag in the jsf-ui.tld file. For some reason he was absent:

    <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> 
+4
source share
1 answer

Have you added facelet files to the project property libraries? Otherwise, check that in Tools / Options / Miscellaneous / Files that xhtml is associated with MIME XHTML (text / xhtml).

+1
source

Source: https://habr.com/ru/post/1302054/


All Articles