ICEfaces
  1. ICEfaces
  2. ICE-6112

ACE generator - output documentation from non-TLD source(s)

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-Beta2
    • Fix Version/s: 2.1-Beta, 3.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      sparkle
    • Assignee Priority:
      P1

      Description

      JSF 2 provides a new taglib.xml schema, and a new faces-config.xml schema, and comes with new files that describe the h: components and classes.

      Here's how the action attribute/property is documented in each. As you can see, the faces-config documentation seems to be a superset of the taglib.xml one:

      mojarra2\jsf-ri\conf\share\html_basic.taglib.xml [ taglib.xml ]

              <attribute>
                  <description>
                      MethodExpression representing the application action to invoke
                      when this component is activated by the user. The expression
                      must evaluate to a public method that takes no parameters, and
                      returns an Object (the toString() of which is called to derive
                      the logical outcome) which is passed to the NavigationHandler
                      for this application.
                  </description>
                  <name>action</name>
                  <required>false</required>
                  <method-signature>java.lang.Object action()</method-signature>
              </attribute>

      mojarra2\jsf-api\doc\standard-html-renderkit.xml

          <property>
            <description>
                MethodExpression representing the application action to invoke
                when this component is activated by the user. The expression
                must evaluate to a public method that takes no parameters, and
                returns an Object (the toString() of which is called to derive
                the logical outcome) which is passed to the NavigationHandler
                for this application.
              </description>
            <display-name>Application Action</display-name>
            <icon/>
            <property-name>action</property-name>
            <property-class>javax.el.MethodExpression</property-class>
            <property-extension>
              <method-signature>
                      java.lang.Object action()
                  </method-signature>
            </property-extension>
          </property>

      Since the faces-config documentation provides more information than the old JSP style TLD, we should probably generate it, and find a way to create our HTML component documentation from it, hopefully using a pre-existing tool that Mojarra or MyFaces might be making use of themselves. Alternatively, we might consider generating our HTML documentation straight from our Meta classes. Lastly, we can simply shoe-horn our newer data into the TLD component description field, and continue using the existing tlddoc tool.

        Issue Links

          Activity

          Hide
          Mark Collette added a comment -

          I had to remove the <handler-class> tag from the second <animation> tag. Basically, the AnimationBehaviorHandler is a BehaviorHandler, which takes a BehaviorConfig in its constructor. So when the <handler-class> is specified inside the <behavior>, everything is good. But when <handler-class> is specified directly in the <tag>, then that's expecting a TagHandler, which takes a TagConfig in its constructor, which causes an exception.

          Also, should there be two <tag> sections for animation, or should that be folded into one?

          <tag>
          <tag-name>animation</tag-name>
          <behavior>
          <behavior-id>org.icefaces.ace.animation.Animation</behavior-id>
          <handler-class>org.icefaces.ace.component.animation.AnimationBehaviorHandler</handler-class>
          </behavior>
          </tag>
          <tag>
          <tag-name>animation</tag-name>
          <handler-class>org.icefaces.ace.component.animation.AnimationBehaviorHandler</handler-class>
          <attribute>
          <description>Something</description>
          <name>to</name>
          <required>false</required>
          <type>java.lang.String</type>
          </attribute>

          Show
          Mark Collette added a comment - I had to remove the <handler-class> tag from the second <animation> tag. Basically, the AnimationBehaviorHandler is a BehaviorHandler, which takes a BehaviorConfig in its constructor. So when the <handler-class> is specified inside the <behavior>, everything is good. But when <handler-class> is specified directly in the <tag>, then that's expecting a TagHandler, which takes a TagConfig in its constructor, which causes an exception. Also, should there be two <tag> sections for animation, or should that be folded into one? <tag> <tag-name>animation</tag-name> <behavior> <behavior-id>org.icefaces.ace.animation.Animation</behavior-id> <handler-class>org.icefaces.ace.component.animation.AnimationBehaviorHandler</handler-class> </behavior> </tag> <tag> <tag-name>animation</tag-name> <handler-class>org.icefaces.ace.component.animation.AnimationBehaviorHandler</handler-class> <attribute> <description>Something</description> <name>to</name> <required>false</required> <type>java.lang.String</type> </attribute>
          Hide
          Arturo Zambrano added a comment -

          I just fixed that at rev 24950. There will be only one <tag> entry for the animation behavior. We were creating this entry ad hoc. I just removed that code, and now the entry is being generated correctly (i.e. with the <behavior> element inside).

          Show
          Arturo Zambrano added a comment - I just fixed that at rev 24950. There will be only one <tag> entry for the animation behavior. We were creating this entry ad hoc. I just removed that code, and now the entry is being generated correctly (i.e. with the <behavior> element inside).
          Hide
          Arturo Zambrano added a comment -

          The hard-coded entries for animation in faces-config.xml were removed and now they are generated, based on the @TagHandler annotation. This applies all existing tag handlers, which at the moment only include <ace:animation> and <ace:ajax>.

          Show
          Arturo Zambrano added a comment - The hard-coded entries for animation in faces-config.xml were removed and now they are generated, based on the @TagHandler annotation. This applies all existing tag handlers, which at the moment only include <ace:animation> and <ace:ajax>.
          Hide
          Ken Fyten added a comment -

          A redundant version of the faces-config.xml entries must now be removed from the ace/resources/META-INF/faces-config.xml file.

          Show
          Ken Fyten added a comment - A redundant version of the faces-config.xml entries must now be removed from the ace/resources/META-INF/faces-config.xml file.
          Hide
          Arturo Zambrano added a comment -

          did task above, committed at revision 26382

          Show
          Arturo Zambrano added a comment - did task above, committed at revision 26382

            People

            • Assignee:
              Arturo Zambrano
              Reporter:
              Mark Collette
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: