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/02/08 19:28:11 UTC
svn commit: r907747 -
/myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Author: jwaldman
Date: Mon Feb 8 18:28:06 2010
New Revision: 907747
URL: http://svn.apache.org/viewvc?rev=907747&view=rev
Log:
TRINIDAD-1677 Tag Documentation to list default value for attributes
commit for Maria Kaval on 1.2.11.1-branch
Modified:
myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
Modified: myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?rev=907747&r1=907746&r2=907747&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/trinidad-maven/branches/1.2.11.1-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java Mon Feb 8 18:28:06 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/>");
}