You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by de...@apache.org on 2017/09/17 18:05:40 UTC

[myfaces-trinidad-maven] 05/07: TRINIDAD-1677 Tag Documentation to list default value for attributes commit for Maria Kaval on 1.2.11.1-branch

This is an automated email from the ASF dual-hosted git repository.

deki pushed a commit to branch 1.2.11.1-branch
in repository https://gitbox.apache.org/repos/asf/myfaces-trinidad-maven.git

commit acc41e30ea63b1e1e086e1ec5c46f94bbfa888ee
Author: Jeanne Waldman <jw...@apache.org>
AuthorDate: Mon Feb 8 18:28:06 2010 +0000

    TRINIDAD-1677 Tag Documentation to list default value for attributes
    commit for Maria Kaval on 1.2.11.1-branch
---
 .../trinidadbuild/plugin/tagdoc/TagdocReport.java     | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java b/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
index e02fc32..1d2b9e5 100644
--- a/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
+++ b/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java
@@ -891,6 +891,14 @@ public class TagdocReport extends AbstractMavenMultiPageReport
       {
         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 @@ public class TagdocReport extends AbstractMavenMultiPageReport
         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/>");
         }
         

-- 
To stop receiving notification emails like this one, please contact
"commits@myfaces.apache.org" <co...@myfaces.apache.org>.