How to add documentation to a composite component attribute

I have a composite component that looks something like this:

<composite:interface>           
    <composite:attribute name="confirmUnload" type="java.lang.Boolean" default="false" />
    <composite:attribute name="showLoader" type="java.lang.Boolean" default="true" />
    <composite:attribute title="test test" name="menuFormIds" type="java.lang.String" default="menuForm" />
    <composite:attribute name="unloadMessage" type="java.lang.String" default="You have unsaved data" />            
</composite:interface>

<composite:implementation>
    <div title="unloadEventComponent">...</div>
</composite:implementation>

      

When using this component on a page, eclipse autocomplete will help with attributes. However, it can sometimes be difficult to understand what this attribute does without looking at the code, which doesn't help the user.

Is there a way to add attributes to a composite component in such a way that it appears in eclipse autocomplete?

PrimeFaces components usually have descriptions when an attribute is selected, but custom components are used instead of composites.

+3


source to share


1 answer


To do this, use the attribute shortDescription

. For example.



<composite:attribute name="confirmUnload" type="java.lang.Boolean" default="false" 
    shortDescription="Set to true to enable the confirm unload message. Defaults to false." />

      

+7


source







All Articles