You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2010/01/21 18:35:24 UTC

svn commit: r901790 - in /myfaces/trinidad-maven/branches/2.0.x-branch: maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/ maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/

Author: arobinson74
Date: Thu Jan 21 17:35:23 2010
New Revision: 901790

URL: http://svn.apache.org/viewvc?rev=901790&view=rev
Log:
Fix up some client behavior code

Modified:
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java
    myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java?rev=901790&r1=901789&r2=901790&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/AbstractComponentGenerator.java Thu Jan 21 17:35:23 2010
@@ -242,6 +242,7 @@
     {
       imports.add("java.util.Arrays");
       imports.add("java.util.Collection");
+      imports.add("java.util.Collections");
       imports.add("java.util.List");
       imports.add("java.util.Map");
       imports.add("javax.faces.component.behavior.ClientBehavior");
@@ -1080,9 +1081,10 @@
     ComponentBean component
     ) throws IOException
   {
-    out.println("private final static Collection<String> _EVENT_NAMES = Arrays.asList(");
+    out.println("// Supported client events for client behaviors:");
+    out.println("private final static Collection<String> _EVENT_NAMES = Collections.unmodifiableCollection(");
     out.indent();
-    out.println("new String [] { ");
+    out.println("Arrays.asList(");
     out.indent();
     boolean first = true;
     int wrapAt = 5;
@@ -1110,7 +1112,7 @@
     }
     out.println();
     out.unindent();
-    out.println(" });");
+    out.println("));");
     out.unindent();
   }
 

Modified: myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java?rev=901790&r1=901789&r2=901790&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-faces-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/faces/generator/component/TrinidadComponentGenerator.java Thu Jan 21 17:35:23 2010
@@ -23,9 +23,7 @@
 import java.lang.reflect.Modifier;
 
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Collection;
-import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
@@ -433,12 +431,4 @@
     }
     return sb.toString();
   }
-
-  private final static Set<String> _CLIENT_EVENT_NAMES = new HashSet<String>(
-    Arrays.asList(
-      new String[] { "onclick", "ondblclick", "onmousedown", "onmouseup", "onmouseover",
-        "onmousemove", "onmouseout", "onkeypress", "onkeydown", "onkeyup", "onfocus",
-        "onblur", "onsubmit", "onchange", "onabort", "onerror", "onload", "onreset",
-        "onresize", "onselect", "onunload" }
-    ));
 }

Modified: myfaces/trinidad-maven/branches/2.0.x-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/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java?rev=901790&r1=901789&r2=901790&view=diff
==============================================================================
--- myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java (original)
+++ myfaces/trinidad-maven/branches/2.0.x-branch/maven-tagdoc-plugin/src/main/java/org/apache/myfaces/trinidadbuild/plugin/tagdoc/TagdocReport.java Thu Jan 21 17:35:23 2010
@@ -416,7 +416,7 @@
 
       if (component.isClientBehaviorHolder())
       {
-        out.write(" <section name=\"Client Events\">\n");
+        out.write(" <section name=\"Supported Client Events for Client Behaviors\">\n");
         out.write(" <p>\n");
         _writeComponentClientEvents(out, component);
         out.write(" </p>\n");