Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-12175

Automatic namespace completion in Facelets files

XMLWordPrintable

      UPDATE: See the demo video: http://www.youtube.com/watch?v=A2Gy5QPeGGk

      RichFaces community is complaining about complexity of maintaining namespaces through the JSF projects [1]

      as the sample could be following project file:
      https://github.com/richfaces/sandbox/blob/760fca06c7db23b542fa8d077f73dfe3e6dd81c5/bootstrap/demo/src/main/webapp/index.xhtml#L11

      It is very hard to maintain namespaces through project.


      What are current options when using JBoss Tools?

      • modify Facelets file templates for creating new files and list all favorite namespaces there
      • use autocompletion of detected namespaces (write xmlns:xyz="..." and autocompletion will offer you available namespaces)

      But both of the solutions are not as straight-forward as it could be.


      Tools could help and store the preferences for namespaces,
      so user would need only to start typing tag with prefix of the namespace (e.g. <a4j: and once he will complete the tag <a4j:ajax>, the namespace will be automatically added to the root of the XML file. (xmlns:a4j="http://richfaces.org/a4j").


      The information about the prefixes could be retrieved from:

      • faces-config.xml generated by RichFaces CDK: faces-config/faces-config-extension/cdk:prefix
      • scanning the Facelets (XHTML) files in a project and collecting used namespace prefixes (xmlns:*)

      [1] https://community.jboss.org/message/738739#738739

            alexeykazakov Alexey Kazakov
            lfryc Lukáš Fryč (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: