You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2010/01/28 19:19:58 UTC
svn commit: r904197 -
/myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Author: jwaldman
Date: Thu Jan 28 18:19:57 2010
New Revision: 904197
URL: http://svn.apache.org/viewvc?rev=904197&view=rev
Log:
TRINIDAD-1677 Tag Documentation to list default value for attributes
commit for Maria Kaval
Modified:
myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Modified: myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?rev=904197&r1=904196&r2=904197&view=diff
==============================================================================
--- myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/trinidad-maven/trunk/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java Thu Jan 28 18:19:57 2010
@@ -891,6 +891,14 @@
{
String valStr = _formatPropList(attr.getPropertyValues(),
"Valid Values");
+
+ // The default value for the attribute. defaultValueStr will be null if no
+ // default value is specified via <default-value> in component xml file.
+ // Since _formatPropList takes an array as the first input param, covert the default
+ // value into a single item array when calling formatPropList
+ String defaultValueStr = _formatPropList (new String[] { attr.getDefaultValue() },
+ "Default Value");
+
String unsupAgentsStr =
_formatPropList(attr.getUnsupportedAgents(),
"Not supported on the following agents",
@@ -914,6 +922,17 @@
if (valStr != null)
{
out.write(valStr);
+ }
+
+ if (defaultValueStr != null)
+ {
+ out.write(defaultValueStr);
+ }
+
+ // if we print out a list of possible values and/or a default value for the attribute,
+ // then enter a line break before printing out other information about the attribute.
+ if (valStr != null || defaultValueStr != null)
+ {
out.write("<br/>");
}