in maven2-plugins/myfaces-tagdoc-plugin/src/main/java/org/apache/myfaces/buildtools/maven2/plugin/tagdoc/TagdocReport.java [828:971]
private void _writeComponentAttributes(Writer out,
Iterator attributes,
String className,
String group) throws IOException
{
boolean writtenAnyAttributes = false;
while (attributes.hasNext())
{
PropertyBean attr = (PropertyBean) attributes.next();
/*
if ((group == null) || "Ungrouped".equals(group))
{
if (doc.group != null)
continue;
}
else
{
if (!group.equalsIgnoreCase(doc.group))
continue;
}
*/
if (!writtenAnyAttributes)
{
writtenAnyAttributes = true;
if (group != null)
{
String sectionName;
if ("events".equalsIgnoreCase(group))
{
sectionName = "JavaScript attributes";
}
else
{
sectionName = group + " attributes";
}
out.write("<subsection name=\"" + sectionName + "\">\n");
}
out.write("<table>\n");
out.write("<tr>\n");
out.write("<th>Name</th>\n");
out.write("<th>Type</th>\n");
out.write("<th>Supports EL?</th>\n");
if (!_attrDocSpansColumns)
{
out.write("<th>Description</th>\n");
}
out.write("</tr>\n");
}
String propertyName = attr.getPropertyName();
// Quick fix of problems with actionExpression vs. action
// actionExpression is the MethodExpression on the component,
// but on the tag it's 'action'
if ("actionExpression".equals(propertyName))
{
propertyName = "action";
}
out.write("<tr>\n");
out.write("<td>" + propertyName + "</td>");
String type = _getDisplayType(className,
propertyName,
attr.getPropertyClass());
out.write("<td>" + type + "</td>");
String elSupported;
// MethodBindings, "binding", and some other attributes
// require EL support
if (attr.isMethodBinding() ||
attr.isMethodExpression() ||
"binding".equals(propertyName))
{
// "action" doesn't require EL; all else do.
elSupported = "action".equals(propertyName) ? "Yes" : "Only EL";
}
else
{
elSupported = attr.isLiteralOnly() ? "No" : "Yes";
}
out.write("<td>" + elSupported + "</td>");
if (attr.getDescription() != null)
{
String valStr = _formatPropList(attr.getPropertyValues(),
"Valid Values");
String unsupAgentsStr =
_formatPropList(attr.getUnsupportedAgents(),
"Not supported on the following agents",
_NON_DOCUMENTED_AGENTS);
String unsupRkStr =
_formatPropList(attr.getUnsupportedRenderKits(),
"Not supported on the following renderkits");
if (_attrDocSpansColumns)
{
out.write("</tr>\n");
out.write("<tr>\n");
out.write("<td colspan=\"3\">\n");
}
else
{
out.write("<td>\n");
}
// out.write(EscapeUtils.escapeElementValue(doc.doc));
if (valStr != null)
{
out.write(valStr);
out.write("<br/>");
}
out.write(attr.getDescription());
if (unsupAgentsStr != null)
{
out.write("<br/>");
out.write(unsupAgentsStr);
}
if (unsupRkStr != null)
{
out.write("<br/>");
out.write(unsupRkStr);
}
//out.write(EscapeUtils.escapeAmpersands(doc.doc));
out.write("</td>\n");
}
out.write("</tr>\n");
}
if (writtenAnyAttributes)
{
out.write("</table>\n");
if (group != null)
{
out.write("</subsection>\n");
}
}
}