Generate Documentation for JSF 2 composite components [closed]
Asked Answered
S

2

14

I'm looking to generate documentation for a custom JSF 2 composite component library. The composite components are not referenced in any faces-config.xml file, but rather the .xhtml files for the composite components are stored in META-INF/resources and use the new composite:interface tag to define the interface.

For JSP tag libraries, documentation can be generated using https://taglibrarydoc.dev.java.net/ and I'm wondering if there is something similar for my JSF 2 composite component library.

Spa answered 5/3, 2010 at 23:31 Comment(1)
Related: How to generate facelets documentation?Cruiserweight
K
2

You can use OmniFaces Vdldoc to generate documentation from your <cc:interface> tags (or the documentation in taglib.xml files).

Say your composite components reside in the /META-INF/resources/myLib folder. You would then need a myLib.taglib.xml-file in the META-INF folder like this:

<facelet-taglib>
    <description>Your description</description>
    <namespace>http://example.com/myLib</namespace>
    <short-name>my</short-name>
    <composite-library-name>myLib</composite-library-name>
</facelet-taglib>

(For a more complete example, have a look at this question)

You can now use Vdldoc to generate your documentation:

java -jar vdldoc-2.1.jar myLib.taglib.xml

Update: If your project uses maven there is now vdldoc-maven-plugin to easily integrate it into your build. Basically just add it to the <reporting>-section of your pom.xml:

<reporting>
  <plugins>
    <plugin>
      <groupId>com.github.matinh.vdldoc</groupId>
      <artifactId>vdldoc-maven-plugin</artifactId>
      <version>2.0</version>
    </plugin>
  </plugins>
</reporting>

And run mvn site to generate the documentation. See the plugin's homepage for more details.

Kermitkermy answered 15/3, 2016 at 9:11 Comment(0)
B
0

rich-faces component development kit provides documentation annotations http://community.jboss.org/wiki/RichFacesCDKannotations

--kiran.kumar

Blackleg answered 24/2, 2011 at 16:0 Comment(1)
That's not really applicable for JSF 2 composite components though.Spa

© 2022 - 2024 — McMap. All rights reserved.