Component Documentation

[Warning]Warning

This section is out of date. In general, each component should include a link to the Component Reference page for the component. The Component Reference page has a format and content similar to what's listed here.

Although there is limited documentation about components in their component specification file, that documentation is designed to be a short reminder, not the complete documentation. Full documentation goes into the component's Java file, as part of its type comment JavaDoc.

Component documentation consists of a table, identifying all the formal parameters of the component. In addition, a note indicating whether informal parameters are allowed, and if the component may have a body (that is, wrap other components) is supplied at the end.

Figure 6.1. Component Documentation Template

/**
 * Type comment documentation ...
 *
 * <p><table border=1>
 * <tr>
 *   <th>Parameter</th>
 *   <th>Type</th>
 *   <th>Direction</th>
 *   <th>Required</th>
 *   <th>Default</th>
 *   <th>Description</th>
 *  </tr>
 *
 * <tr>
 *   <td>name</td>
 *   <td>{@link Type}</td>
 *   <td>in|out|in-out</td> 1
 *   <td>yes|no</td>
 *   <td>Default value</td> 2
 *   <td>Full description</td>
 * </tr>
 *
 * ...
 *
 * <p>Informal parameters are [not] allowed.  The component
 * may [not] contain a body.
 *
 * ...
 *
 */
1

This describes how the component uses its binding. in indicates the binding is read, but never updated, which is the most common case. out indicates the binding is updated, but not read; this is rare, but does apply to some parameters of Foreach, for example. in-out is common used with certain form parameters.

2

If the parameter is required, then this is usually specified as &nbsp; (non-breaking space).

Recently, seperate HTML component documentation has been created. This will be the standard location for Framework component documentation. Javadoc for the component should simply have a link to the correct Component Reference page.

The component reference is simply HTML (at least, for the time being). There are many examples and a template available, for creating new reference pages.