myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1767896 [2/2] - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/t...
Date Thu, 03 Nov 2016 14:48:35 GMT
Modified: myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg?rev=1767896&r1=1767895&r2=1767896&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
(original)
+++ myfaces/tobago/trunk/tobago-tool/tobago-tool-apt/src/main/resources/org/apache/myfaces/tobago/apt/component.stg
Thu Nov  3 14:48:35 2016
@@ -45,7 +45,9 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.util.Deprecation;
 import javax.el.ELException;
 import javax.faces.FacesException;
+import java.util.Arrays;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.List;
 import javax.el.MethodExpression;
 import javax.el.ValueExpression;
@@ -75,6 +77,22 @@ public class <componentInfo.className>
   public static final String COMPONENT_FAMILY = "<componentInfo.componentFamily>";
 
   <endif>
+  <if(componentInfo.behaviors)>
+  private static final Collection\<String\> EVENT_NAMES = Arrays.asList(<first(componentInfo.behaviors):{
it | "<it>"}><rest(componentInfo.behaviors):{ it |, "<it>"}>);
+
+  @Override
+  public Collection\<String\> getEventNames() {
+    return EVENT_NAMES;
+  }
+
+  <endif>
+  <if(componentInfo.defaultBehavior)>
+  @Override
+  public String getDefaultEventName() {
+    return "<componentInfo.defaultBehavior>";
+  }
+
+  <endif>
   <componentInfo.transientProperties:field(); separator="\n">
 
   <if(componentInfo.properties)>
@@ -556,6 +574,10 @@ enumName() ::= <<
 <it.propertyName>,
 >>
 
+strings() ::= <<
+<it.propertyName>,
+>>
+
 field() ::= <<
 private <it.internalType> <it.propertyName>;
 >>



Mime
View raw message