myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1767871 [2/3] - in /myfaces/tobago/trunk: tobago-core/src/main/java/org/apache/myfaces/tobago/component/ tobago-core/src/main/java/org/apache/myfaces/tobago/facelets/ tobago-core/src/main/java/org/apache/myfaces/tobago/internal/behavior/ t...
Date Thu, 03 Nov 2016 11:28:26 GMT
Added: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/EventTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/EventTagDeclaration.java?rev=1767871&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/EventTagDeclaration.java (added)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/EventTagDeclaration.java Thu Nov  3 11:28:25 2016
@@ -0,0 +1,62 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.myfaces.tobago.internal.taglib.component;
+
+import org.apache.myfaces.tobago.apt.annotation.Tag;
+import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
+import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
+import org.apache.myfaces.tobago.component.RendererTypes;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasAction;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasActionListener;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasConfirmation;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasLink;
+import org.apache.myfaces.tobago.internal.taglib.declaration.HasTarget;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsDisabledBySecurity;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsImmediateCommand;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsOmit;
+import org.apache.myfaces.tobago.internal.taglib.declaration.IsTransition;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UICommand;
+
+/**
+ * Add an event behavior to the component.
+ */
+@Tag(name = "event")
+@UIComponentTag(uiComponent = "org.apache.myfaces.tobago.component.UIEvent",
+    uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIEvent",
+    uiComponentFacesClass = "javax.faces.component.UICommand",
+    componentFamily = UICommand.COMPONENT_FAMILY,
+    rendererType = RendererTypes.EVENT,
+    faceletHandler = "org.apache.myfaces.tobago.facelets.EventHandler")
+public interface EventTagDeclaration
+    extends HasIdBindingAndRendered, HasAction, HasActionListener, IsImmediateCommand, HasConfirmation,
+    HasLink, IsTransition, HasTarget, IsDisabledBySecurity, IsOmit {
+
+  /**
+   * The name of the event.
+   */
+  @TagAttribute
+  @UIComponentTagAttribute(type = "org.apache.myfaces.tobago.component.ClientBehaviors")
+  void setEvent(final ValueExpression event);
+
+}

Copied: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java (from r1765603, myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnEventTagDeclaration.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java?p2=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java&p1=myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnEventTagDeclaration.java&r1=1765603&r2=1767871&rev=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/ColumnEventTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/RowTagDeclaration.java Thu Nov  3 11:28:25 2016
@@ -20,23 +20,17 @@
 package org.apache.myfaces.tobago.internal.taglib.component;
 
 import org.apache.myfaces.tobago.apt.annotation.Tag;
-import org.apache.myfaces.tobago.apt.annotation.TagAttribute;
 import org.apache.myfaces.tobago.apt.annotation.UIComponentTag;
-import org.apache.myfaces.tobago.apt.annotation.UIComponentTagAttribute;
 import org.apache.myfaces.tobago.internal.taglib.declaration.HasIdBindingAndRendered;
 
 /**
- * This component creates an event in a UISheet for each row.
+ * This component creates a representative in a UISheet for each row.
+ * The tag must be a subtag of <tc:sheet>
  */
-@Tag(name = "columnEvent")
+@Tag(name = "row")
 @UIComponentTag(
-    uiComponent = "org.apache.myfaces.tobago.component.UIColumnEvent",
-    uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIColumnEvent",
-    uiComponentFacesClass = "javax.faces.component.UIColumn",
-    interfaces = "org.apache.myfaces.tobago.component.ColumnEvent")
-public interface ColumnEventTagDeclaration extends HasIdBindingAndRendered {
-
-  @TagAttribute
-  @UIComponentTagAttribute(type = "java.lang.String", allowedValues = {"click", "dblclick"})
-  void setEvent(String event);
+    uiComponent = "org.apache.myfaces.tobago.component.UIRow",
+    uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUIRow",
+    uiComponentFacesClass = "javax.faces.component.UIColumn")
+public interface RowTagDeclaration extends HasIdBindingAndRendered {
 }

Modified: myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/main/java/org/apache/myfaces/tobago/internal/taglib/component/SheetTagDeclaration.java Thu Nov  3 11:28:25 2016
@@ -42,7 +42,7 @@ import javax.faces.component.UIData;
  * Render a sheet element.
  */
 @Tag(name = "sheet")
-@BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>? <tc:columnEvent>?")
+@BodyContentDescription(anyTagOf = "<tc:column>* <tc:columnSelector>? <tc:row>?")
 @UIComponentTag(
     uiComponent = "org.apache.myfaces.tobago.component.UISheet",
     uiComponentBaseClass = "org.apache.myfaces.tobago.internal.component.AbstractUISheet",

Copied: myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ClientBehaviorsUnitTest.java (from r1767843, myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ClientBehaviorsUnitTest.java?p2=myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ClientBehaviorsUnitTest.java&p1=myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java&r1=1767843&r2=1767871&rev=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/FacetsUnitTest.java (original)
+++ myfaces/tobago/trunk/tobago-core/src/test/java/org/apache/myfaces/tobago/component/ClientBehaviorsUnitTest.java Thu Nov  3 11:28:25 2016
@@ -22,7 +22,7 @@ package org.apache.myfaces.tobago.compon
 import org.apache.myfaces.tobago.util.EnumUnitTest;
 import org.junit.Test;
 
-public class FacetsUnitTest extends EnumUnitTest {
+public class ClientBehaviorsUnitTest extends EnumUnitTest {
 
   @Test
   public void testNames() throws IllegalAccessException, NoSuchFieldException {

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/list.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/list.xhtml?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/list.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-addressbook/src/main/webapp/addressbook/list.xhtml Thu Nov  3 11:28:25 2016
@@ -109,9 +109,9 @@
                 var="address" state="#{controller.selectedAddresses}"
                 sortActionListener="#{controller.sheetSorter}" rows="15"
                 showRowRange="left" showPageRange="right" showDirectLinks="center">
-        <tc:columnEvent event="dblclick">
-          <tc:command action="#{controller.editAddress}"/>
-        </tc:columnEvent>
+        <tc:row>
+          <tc:event event="dblclick" action="#{controller.editAddress}"/>
+        </tc:row>
         <tc:column id="firstName" label="#{bundle.listFirstName}" sortable="true"
                    rendered="#{controller.renderFirstName}">
           <tc:out value="#{address.firstName}"/>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ProgressController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ProgressController.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ProgressController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/ProgressController.java Thu Nov  3 11:28:25 2016
@@ -23,6 +23,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.enterprise.context.SessionScoped;
+import javax.faces.event.FacesEvent;
 import javax.inject.Named;
 import javax.swing.DefaultBoundedRangeModel;
 import java.io.Serializable;
@@ -51,6 +52,10 @@ public class ProgressController implemen
     }
   }
 
+  public void resetProgress(final FacesEvent event) {
+    progress.setValue(0);
+  }
+
   public Date getCurrentDate() {
     return new Date();
   }

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetController.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetController.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetController.java (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/java/org/apache/myfaces/tobago/example/demo/SheetController.java Thu Nov  3 11:28:25 2016
@@ -31,7 +31,7 @@ import javax.faces.component.UIComponent
 import javax.faces.component.UIData;
 import javax.faces.context.FacesContext;
 import javax.faces.convert.DateTimeConverter;
-import javax.faces.event.ActionEvent;
+import javax.faces.event.FacesEvent;
 import javax.inject.Named;
 import java.io.Serializable;
 import java.util.ArrayList;
@@ -83,7 +83,7 @@ public class SheetController implements
     this.sheetState = sheetState;
   }
 
-  public void selectSolarObject(final ActionEvent actionEvent) {
+  public void selectSolarObject(final FacesEvent actionEvent) {
     LOG.info("actionEvent=" + actionEvent);
     final UIData data = ComponentUtils.findAncestor(actionEvent.getComponent(), UIData.class);
     if (data != null) {

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/30-event/sheet-column-event.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/30-event/sheet-column-event.xhtml?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/30-event/sheet-column-event.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/080-sheet/30-event/sheet-column-event.xhtml Thu Nov  3 11:28:25 2016
@@ -39,27 +39,27 @@
     <p>Select an object from the SolarObjects list.</p>
     <tc:segmentLayout id="example" medium="5;7">
       <tc:box label="Solar Objects">
-        <tc:sheet id="s1" value="#{sheetController.solarList}" var="object" columns="1*" markup="small">
+        <tc:sheet id="s1" value="#{sheetController.solarList}" var="object" columns="*" markup="small">
           <tc:style maxHeight="486px"/>
           <tc:column label="#{overviewBundle.solarArrayName}">
             <tc:out value="#{object.name}" id="t_name" labelLayout="skip"/>
           </tc:column>
-          <tc:columnEvent id="sample0" rendered="#{sheetController.columnEventSample == 0}">
-            <tc:command actionListener="#{sheetController.selectSolarObject}" immediate="true" id="columnEventAjax">
+          <tc:row id="sample0" rendered="#{sheetController.columnEventSample == 0}">
+            <!-- todo: immediate? -->
+            <f:ajax render=":::detail" listener="#{sheetController.selectSolarObject}" id="columnEventAjax"/>
+          </tc:row>
+          <tc:row id="sample1" rendered="#{sheetController.columnEventSample == 1}">
+            <tc:event actionListener="#{sheetController.selectSolarObject}" immediate="true" id="columnEventClick"
+                      event="click">
               <tc:resetInputActionListener/>
-              <f:ajax render=":::detail"/>
-            </tc:command>
-          </tc:columnEvent>
-          <tc:columnEvent id="sample1" rendered="#{sheetController.columnEventSample == 1}" event="click">
-            <tc:command actionListener="#{sheetController.selectSolarObject}" immediate="true" id="columnEventClick">
+            </tc:event>
+          </tc:row>
+          <tc:row id="sample2" rendered="#{sheetController.columnEventSample == 2}">
+            <tc:event actionListener="#{sheetController.selectSolarObject}" immediate="true" id="columnEventDblClick"
+                      event="dblclick">
               <tc:resetInputActionListener/>
-            </tc:command>
-          </tc:columnEvent>
-          <tc:columnEvent id="sample2" rendered="#{sheetController.columnEventSample == 2}" event="dblclick">
-            <tc:command actionListener="#{sheetController.selectSolarObject}" immediate="true" id="columnEventDblClick">
-              <tc:resetInputActionListener/>
-            </tc:command>
-          </tc:columnEvent>
+            </tc:event>
+          </tc:row>
         </tc:sheet>
       </tc:box>
 

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event-input.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event-input.xhtml?rev=1767871&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event-input.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event-input.xhtml Thu Nov  3 11:28:25 2016
@@ -0,0 +1,54 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<ui:composition template="/plain.xhtml"
+                xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+
+    <tc:box label="Event behavior">
+
+      <tc:section label="New">
+        <tc:sheet markup="small,hover" value="#{sheetController.solarList}" var="object" rows="3">
+          <tc:row id="row">
+            <f:ajax event="click"/>
+          </tc:row>
+          <tc:column label="Name">
+            <tc:out value="#{object.name}" labelLayout="skip"/>
+          </tc:column>
+        </tc:sheet>
+      </tc:section>
+
+      <!--
+              <tc:in id="in-1" label="input">
+                <tc:event id="eventchange" event="change" action="Wurst Ändern"/>
+                <tc:event id="eventclick" event="click" action="Wurst Klicken"/>
+              </tc:in>
+
+              <tc:in id="in-2" label="input">
+                <f:facet name="change">
+                  <tc:link id="link" action="Wurst"/>
+                </f:facet>
+              </tc:in>
+      -->
+
+    </tc:box>
+
+</ui:composition>

Added: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.xhtml?rev=1767871&view=auto
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.xhtml (added)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/event.xhtml Thu Nov  3 11:28:25 2016
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+
+<ui:composition template="/main.xhtml"
+                xmlns="http://www.w3.org/1999/xhtml"
+                xmlns:tc="http://myfaces.apache.org/tobago/component"
+                xmlns:ui="http://java.sun.com/jsf/facelets"
+                xmlns:f="http://java.sun.com/jsf/core">
+
+  <tc:section label="Checking different solutions to adjust f:ajax and the old tobago event facets.">
+
+    <tc:box label="Panel with reload, every 10 seconds">
+
+      <tc:section label="Old">
+        <tc:panel>
+          <f:facet name="reload">
+            <tc:reload frequency="10000"/>
+          </f:facet>
+          Panel content
+        </tc:panel>
+      </tc:section>
+
+      <tc:section label="New">
+        <tc:panel>
+          <tc:reload frequency="10000"/>
+          Panel content
+        </tc:panel>
+      </tc:section>
+
+    </tc:box>
+
+    <tc:box label="Send AJAX call on change event on input field.">
+
+      <tc:section label="Old = New">
+        <tc:in label="input">
+          <f:ajax/>
+        </tc:in>
+      </tc:section>
+
+    </tc:box>
+
+    <tc:box label="Send normal call on change event on input field.">
+
+      <tc:section label="Old">
+        <tc:in label="input">
+          <f:facet name="change">
+            <tc:command/>
+          </f:facet>
+        </tc:in>
+      </tc:section>
+
+      <tc:section label="New">
+        <tc:in label="input">
+          <tc:event event="change"/>
+        </tc:in>
+      </tc:section>
+
+    </tc:box>
+
+    <tc:box label="Sheet: click in a row (AJAX)">
+
+      <tc:section label="Old">
+        <tc:sheet markup="small,hover" value="#{sheetController.solarList}" var="object" rows="3">
+          <tc:columnEvent>
+            <tc:command>
+              <f:ajax/>
+            </tc:command>
+          </tc:columnEvent>
+          <tc:column label="Name">
+            <tc:out value="#{object.name}" labelLayout="skip"/>
+          </tc:column>
+        </tc:sheet>
+        Remark: event attribute of tc:columnEvent must not be defined.
+      </tc:section>
+
+      <tc:section label="New">
+        <tc:sheet markup="small,hover" value="#{sheetController.solarList}" var="object" rows="3">
+          <tc:row>
+            <f:ajax/>
+          </tc:row>
+          <tc:column label="Name">
+            <tc:out value="#{object.name}" labelLayout="skip"/>
+          </tc:column>
+        </tc:sheet>
+      </tc:section>
+
+    </tc:box>
+
+    <tc:box label="Sheet: click in a row (no AJAX, normal request)">
+
+      <tc:section label="Old">
+        <tc:sheet markup="small,hover" value="#{sheetController.solarList}" var="object" rows="3">
+          <tc:columnEvent event="click">
+            <tc:command action="..."/>
+          </tc:columnEvent>
+          <tc:column label="Name">
+            <tc:out value="#{object.name}" labelLayout="skip"/>
+          </tc:column>
+        </tc:sheet>
+      </tc:section>
+
+      <tc:section label="New">
+        <tc:sheet markup="small,hover" value="#{sheetController.solarList}" var="object" rows="3">
+          <tc:row>
+            <tc:event event="click" action="..."/>
+          </tc:row>
+          <tc:column label="Name">
+            <tc:out value="#{object.name}" labelLayout="skip"/>
+          </tc:column>
+        </tc:sheet>
+      </tc:section>
+
+    </tc:box>
+
+    <tc:box label="TODO">
+
+      <tc:section label="Old">
+      </tc:section>
+
+      <tc:section label="New">
+      </tc:section>
+
+    </tc:box>
+
+  </tc:section>
+
+</ui:composition>

Copied: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/progress.xhtml (from r1766842, myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/50-progress/progress.xhtml)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/progress.xhtml?p2=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/progress.xhtml&p1=myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/50-progress/progress.xhtml&r1=1766842&r2=1767871&rev=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/020-output/50-progress/progress.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/40-test/6000-event/progress.xhtml Thu Nov  3 11:28:25 2016
@@ -17,65 +17,25 @@
  * limitations under the License.
 -->
 
-<ui:composition template="/main.xhtml"
+<ui:composition template="/plain.xhtml"
                 xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:tc="http://myfaces.apache.org/tobago/component"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:f="http://java.sun.com/jsf/core">
-  <ui:param name="title" value="#{overviewBundle.progress} &lt;tc:progress>"/>
-  <p>The <code class="language-markup">&lt;tc:progress/></code> tag create a progressbar.
-    The most important attribute is <code>value</code>.
-    It could be a <code>double</code> - in that case, you need the attribute <code>max</code> as well.
-    Or it is of type <code>BoundedRangeModel</code>.</p>
-  <p>Tag Library Documentation:
-    <tc:link label="&lt;tc:progress/>" image="image/feather-leaf.png" link="#{overviewBundle.tagDocUrl}/progress.html"/>
-    |
-    <tc:link label="BoundedRangeModel"
-             link="https://docs.oracle.com/javase/7/docs/api/javax/swing/BoundedRangeModel.html"/></p>
-
-  <tc:section label="Basics">
-    <p>A static progressbar, with <code>value</code> of type <code>double</code>.</p>
-    <pre><code class="language-markup">&lt;tc:progress value="15.8" max="20"/></code></pre>
-    <tc:progress value="14.9" max="20"/>
-  </tc:section>
-
-  <tc:section label="Style">
-    <p>A static progressbar containing a <code class="language-markup">&lt;tc:style width="50%" height="2px"/></code>
-      tag.</p>
-    <tc:progress value="14.9" max="20">
-      <tc:style width="50%" height="2px"/>
-    </tc:progress>
-  </tc:section>
 
-  <tc:section label="Button">
-    <p>By pressing the button, progress is added to the progressbar.</p>
-    <pre><code class="language-markup">&lt;tc:button label="Add Progress" action="\#{progressController.addProgress}"/>
-&lt;tc:progress value="\#{progressController.progress}"/></code></pre>
-    <tc:button id="b1" label="Add Progress" action="#{progressController.addProgress}"/>
-    <br/>
-    <tc:progress value="#{progressController.progress}"/>
-  </tc:section>
+  <ui:param name="title" value="#{overviewBundle.progress} &lt;tc:progress>"/>
 
-  <tc:section label="Time">
-    <p>In this example, the current time is displayed as progressbars.</p>
-    <pre><code
-            class="language-markup">&lt;tc:progress value="\#{progressController.currentHours}" max="23"/></code></pre>
-    <tc:panel id="reloadPanel">
-      <f:facet name="reload">
-        <tc:reload frequency="1000" update="true"/>
-      </f:facet>
-      <tc:out id="o1" label="Current Date" value="#{progressController.currentDate}">
-        <f:convertDateTime pattern="HH:mm:ss"/>
-      </tc:out>
+  <tc:section label="Event: complete">
 
-      <tc:label value="Hour"/>
-      <tc:progress value="#{progressController.currentHours}" max="23"/>
-      <br/>
-      <tc:label value="Minutes"/>
-      <tc:progress value="#{progressController.currentMinutes}" max="59"/>
-      <br/>
-      <tc:label value="Seconds"/>
-      <tc:progress value="#{progressController.currentSeconds}" max="59"/>
+    <tc:panel id="panel">
+      <tc:label value="Progress"/>
+      <tc:progress value="#{progressController.progress}">
+        <tc:event event="complete" actionListener="#{progressController.resetProgress}"/>
+      </tc:progress>
+      <tc:button label="+1" action="#{progressController.addProgress}">
+        <!--<f:ajax render="panel"/>-->
+      </tc:button>
     </tc:panel>
   </tc:section>
+
 </ui:composition>

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml (original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/init.xhtml Thu Nov  3 11:28:25 2016
@@ -24,9 +24,7 @@
   <tc:loadBundle basename="overview" var="overviewBundle"/>
   <tc:page applicationIcon="icon/favicon.ico" label="#{overviewBundle.pageTitle}" id="page">
 
-    <f:facet name="load">
-      <tc:link action="#{navigationState.gotoFirst}"/>
-    </f:facet>
+    <tc:event event="load" action="#{navigationState.gotoFirst}"/>
 
     <!-- todo: justifyContent -->
     <tc:flexLayout rows="auto;auto" alignItems="center" justifyContent="center">

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/AjaxClientBehaviorRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/AjaxClientBehaviorRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/AjaxClientBehaviorRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/AjaxClientBehaviorRenderer.java Thu Nov  3 11:28:25 2016
@@ -19,11 +19,16 @@
 
 package org.apache.myfaces.tobago.renderkit.html;
 
+import org.apache.myfaces.tobago.component.ClientBehaviors;
+import org.apache.myfaces.tobago.internal.behavior.EventBehavior;
 import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
+import org.apache.myfaces.tobago.internal.component.AbstractUIEvent;
 import org.apache.myfaces.tobago.internal.component.AbstractUIOperation;
 import org.apache.myfaces.tobago.internal.util.StringUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import javax.faces.component.ActionSource;
 import javax.faces.component.EditableValueHolder;
@@ -40,51 +45,64 @@ import java.util.List;
 
 public class AjaxClientBehaviorRenderer extends ClientBehaviorRenderer {
 
+  private static final Logger LOG = LoggerFactory.getLogger(AjaxClientBehaviorRenderer.class);
+
   public static final String COMMAND_MAP = AjaxClientBehaviorRenderer.class.getName() + ".CommandMap";
 
   @Override
   public String getScript(ClientBehaviorContext behaviorContext, ClientBehavior behavior) {
 
-    final AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;
     final FacesContext facesContext = behaviorContext.getFacesContext();
-    final Collection<String> execute = ajaxBehavior.getExecute();
-    final Collection<String> render = ajaxBehavior.getRender();
     final UIComponent uiComponent = behaviorContext.getComponent();
+    final ClientBehaviors eventName = ClientBehaviors.valueOf(behaviorContext.getEventName());
 
     //// TBD: is this nice? May be implemented with a JSF behaviour?
     final Collapse collapse = createCollapsible(facesContext, uiComponent);
 
-    final UIComponent component;
-    if (uiComponent instanceof AbstractUICommand) {
-      component = uiComponent;
-    } else {
-      final UIComponent facetComponent = uiComponent.getFacet(behaviorContext.getEventName());
-      if (facetComponent instanceof AbstractUICommand) {
-        component = facetComponent;
+    String executeIds = null;
+    String renderIds = null;
+    Boolean transition = null;
+    String target = null;
+    String actionId = null;
+    boolean omit = false;
+    if (behavior instanceof AjaxBehavior) {
+      AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;
+      final Collection<String> execute = ajaxBehavior.getExecute();
+      final Collection<String> render = ajaxBehavior.getRender();
+      final String clientId = uiComponent.getClientId(facesContext);
+
+      executeIds
+          = ComponentUtils.evaluateClientIds(facesContext, uiComponent, execute.toArray(new String[execute.size()]));
+      if (executeIds != null) {
+        executeIds = executeIds + " " + clientId;
       } else {
-        component = uiComponent;
+        executeIds = clientId;
       }
-    }
-
-    boolean omit = component instanceof AbstractUICommand
-        && (((AbstractUICommand) component).isOmit()
-            // if it is a link, the default submit must not be called.
-            || StringUtils.isNotBlank(RenderUtils.generateUrl(facesContext, (AbstractUICommand) component)));
-
-    final String clientId = component.getClientId(facesContext);
-    String executeIds =
-        ComponentUtils.evaluateClientIds(facesContext, component, execute.toArray(new String[execute.size()]));
-    if (executeIds != null) {
-      executeIds = executeIds + " " + clientId;
+      if (uiComponent instanceof AbstractUICommand) { // <f:ajax> inside of a command
+        AbstractUICommand command = (AbstractUICommand) uiComponent;
+        transition = command.isTransition();
+        target = command.getTarget();
+        omit = command.isOmit() || StringUtils.isNotBlank(RenderUtils.generateUrl(facesContext, command));
+      }
+      renderIds =
+          ComponentUtils.evaluateClientIds(facesContext, uiComponent, render.toArray(new String[render.size()]));
+      actionId = clientId;
+    } else if (behavior instanceof EventBehavior) { // <tc:event>
+      AbstractUIEvent event = findEvent(uiComponent, eventName);
+      transition = event.isTransition();
+      target = event.getTarget();
+      actionId = event.getClientId(facesContext);
+      omit = event.isOmit() || StringUtils.isNotBlank(RenderUtils.generateUrl(facesContext, event));
     } else {
-      executeIds = clientId;
+      LOG.warn("Unknown behavior '{}'!", behavior.getClass().getName());
     }
+
     final Command command = new Command(
-        clientId,
-        (component instanceof AbstractUICommand) ? ((AbstractUICommand) component).isTransition() : null,
-        (component instanceof AbstractUICommand) ? ((AbstractUICommand) component).getTarget() : null,
+        actionId,
+        transition,
+        target,
         executeIds,
-        ComponentUtils.evaluateClientIds(facesContext, component, render.toArray(new String[render.size()])),
+        renderIds,
         null,
         null, // getConfirmation(command), // todo
         null,
@@ -92,13 +110,25 @@ public class AjaxClientBehaviorRenderer
         omit);
 
     final CommandMap map = new CommandMap();
-    map.addCommand(behaviorContext.getEventName(), command);
+    map.addCommand(eventName, command);
     facesContext.getAttributes().put(COMMAND_MAP, map);
 
     // XXX the return value is a string, but we should use a CommandMap
     return COMMAND_MAP;
   }
 
+  private AbstractUIEvent findEvent(final UIComponent component, final ClientBehaviors eventName) {
+    for (UIComponent child : component.getChildren()) {
+      if (child instanceof AbstractUIEvent) {
+        AbstractUIEvent event = (AbstractUIEvent) child;
+        if (eventName == event.getEvent()) {
+          return event;
+        }
+      }
+    }
+    return null;
+  }
+
   @Override
   public void decode(FacesContext context, UIComponent component, ClientBehavior behavior) {
     AjaxBehavior ajaxBehavior = (AjaxBehavior) behavior;

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/Command.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/Command.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/Command.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/Command.java Thu Nov  3 11:28:25 2016
@@ -43,7 +43,6 @@ public class Command {
   private String action;
   private Boolean transition;
   private String target;
-  private String partially;
   private String execute;
   private String render;
   private String focus;
@@ -152,24 +151,6 @@ public class Command {
     this.target = target;
   }
 
-  /**
-   * @deprecated use getExecute() getRender() instead
-   */
-  @Deprecated
-  public String getPartially() {
-    return partially;
-  }
-
-  /**
-   * @deprecated use setExecute() setRender() instead
-   */
-  @Deprecated
-  public void setPartially(final String partially) {
-    if (StringUtils.isNotBlank(partially)) {
-      this.partially = partially;
-    }
-  }
-
   public String getExecute() {
     return execute;
   }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/CommandMap.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/CommandMap.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/CommandMap.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/CommandMap.java Thu Nov  3 11:28:25 2016
@@ -19,6 +19,8 @@
 
 package org.apache.myfaces.tobago.renderkit.html;
 
+import org.apache.myfaces.tobago.component.ClientBehaviors;
+
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
@@ -32,7 +34,7 @@ import java.util.Map;
 public class CommandMap {
 
   private Command click;
-  private Map<String, Command> other;
+  private Map<ClientBehaviors, Command> other;
 
   /**
    * Creates an empty command map, which may hold different command triggered by different keys.
@@ -55,21 +57,19 @@ public class CommandMap {
     return click;
   }
 
-  public void addCommand(final String name, final Command command) {
-    if (name.equals("click")) {
+  public void addCommand(final ClientBehaviors name, final Command command) {
+    if (name == ClientBehaviors.click) {
       setClick(command);
     } else {
       if (other == null) {
-        other = new HashMap<String, Command>();
+        other = new HashMap<ClientBehaviors, Command>();
       }
 
-      assert name.matches("[a-z]+");
-
       other.put(name, command);
     }
   }
 
-  public Map<String, Command> getOther() {
+  public Map<ClientBehaviors, Command> getOther() {
     if (other != null) {
       return Collections.unmodifiableMap(other);
     } else {
@@ -82,7 +82,7 @@ public class CommandMap {
     if (click != null) {
       setClick(click);
     } else {
-      for (Map.Entry<String, Command> entry : commandMap.getOther().entrySet()) {
+      for (Map.Entry<ClientBehaviors, Command> entry : commandMap.getOther().entrySet()) {
         addCommand(entry.getKey(), entry.getValue());
       }
     }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/JsonUtils.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/JsonUtils.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/JsonUtils.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/JsonUtils.java Thu Nov  3 11:28:25 2016
@@ -19,6 +19,7 @@
 
 package org.apache.myfaces.tobago.renderkit.html;
 
+import org.apache.myfaces.tobago.component.ClientBehaviors;
 import org.apache.myfaces.tobago.internal.context.DateTimeI18n;
 import org.apache.myfaces.tobago.layout.AutoLayoutToken;
 import org.apache.myfaces.tobago.layout.LayoutToken;
@@ -108,12 +109,12 @@ public class JsonUtils {
 
     final Command click = commandMap.getClick();
     if (click != null) {
-      encode(builder, "click", click);
+      encode(builder, ClientBehaviors.click, click);
     }
 
-    final Map<String, Command> other = commandMap.getOther();
+    final Map<ClientBehaviors, Command> other = commandMap.getOther();
     if (other != null) {
-      for(final Map.Entry<String, Command> entry : other.entrySet()) {
+      for(final Map.Entry<ClientBehaviors, Command> entry : other.entrySet()) {
         encode(builder, entry.getKey(), entry.getValue());
       }
     }
@@ -127,7 +128,7 @@ public class JsonUtils {
     return builder.toString();
   }
 
-  private static void encode(final StringBuilder builder, final String name, final Command command) {
+  private static void encode(final StringBuilder builder, final ClientBehaviors name, final Command command) {
     builder.append("\"");
     builder.append(name);
     builder.append("\":{");
@@ -145,10 +146,6 @@ public class JsonUtils {
     if (target != null) {
       encode(builder, "target", target);
     }
-    final String partially = command.getPartially();
-    if (partially != null) {
-      encode(builder, "partially", partially);
-    }
     final String execute = command.getExecute();
     if (execute != null) {
       encode(builder, "execute", execute);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java Thu Nov  3 11:28:25 2016
@@ -26,19 +26,15 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.internal.component.AbstractUIFormBase;
 import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
 import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
-import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
 import org.apache.myfaces.tobago.renderkit.css.CssItem;
 import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
-import org.apache.myfaces.tobago.renderkit.html.Command;
-import org.apache.myfaces.tobago.renderkit.html.CommandMap;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
-import org.apache.myfaces.tobago.renderkit.html.JsonUtils;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
 import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
@@ -48,36 +44,15 @@ import org.slf4j.LoggerFactory;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.event.ActionEvent;
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.List;
 
-public abstract class CommandRendererBase extends RendererBase {
+public abstract class CommandRendererBase extends EventRenderer {
 
   private static final Logger LOG = LoggerFactory.getLogger(CommandRendererBase.class);
 
   @Override
-  public void decode(final FacesContext facesContext, final UIComponent component) {
-
-    if (ComponentUtils.isOutputOnly(component)) {
-      return;
-    }
-    final String sourceId = facesContext.getExternalContext().getRequestParameterMap().get("javax.faces.source");
-    final String clientId = component.getClientId(facesContext);
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("sourceId = '" + sourceId + "'");
-      LOG.debug("clientId = '" + clientId + "'");
-    }
-    if (clientId.equals(sourceId)) {
-      if (LOG.isDebugEnabled()) {
-        LOG.debug("queueEvent = '" + clientId + "'");
-      }
-      commandActivated(component);
-    }
-  }
-
-  @Override
   public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
 
     final AbstractUICommand command = (AbstractUICommand) component;
@@ -117,12 +92,10 @@ public abstract class CommandRendererBas
         command.setOmit(true);
       }
 
-      String commands = RenderUtils.getBehaviorCommands(facesContext, command);
-      if (commands == null) { // old way
-        final CommandMap map = new CommandMap(new Command(facesContext, command));
-        commands = JsonUtils.encode(map);
+      final String commands = RenderUtils.getBehaviorCommands(facesContext, command);
+      if (commands != null) {
+        writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
       }
-      writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
 
       if (label.getAccessKey() != null) {
         writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(label.getAccessKey()), false);
@@ -246,10 +219,6 @@ public abstract class CommandRendererBas
     }
   }
 
-  protected void commandActivated(final UIComponent component) {
-    component.queueEvent(new ActionEvent(component));
-  }
-
   protected void addCssItems(
       final FacesContext facesContext, final AbstractUICommand command, final List<CssItem> collected) {
   }

Copied: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/EventRenderer.java (from r1766668, myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java)
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/EventRenderer.java?p2=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/EventRenderer.java&p1=myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java&r1=1766668&r2=1767871&rev=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/CommandRendererBase.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/EventRenderer.java Thu Nov  3 11:28:25 2016
@@ -19,43 +19,18 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.Attributes;
-import org.apache.myfaces.tobago.component.UICommands;
-import org.apache.myfaces.tobago.internal.component.AbstractUIButton;
-import org.apache.myfaces.tobago.internal.component.AbstractUICommand;
-import org.apache.myfaces.tobago.internal.component.AbstractUIFormBase;
-import org.apache.myfaces.tobago.internal.util.AccessKeyLogger;
-import org.apache.myfaces.tobago.renderkit.LabelWithAccessKey;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
-import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
-import org.apache.myfaces.tobago.renderkit.css.Classes;
-import org.apache.myfaces.tobago.renderkit.css.CssItem;
-import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
-import org.apache.myfaces.tobago.renderkit.html.Command;
-import org.apache.myfaces.tobago.renderkit.html.CommandMap;
-import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
-import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
-import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
-import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
-import org.apache.myfaces.tobago.renderkit.html.HtmlRoleValues;
-import org.apache.myfaces.tobago.renderkit.html.JsonUtils;
-import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
-import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
-import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.event.ActionEvent;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 
-public abstract class CommandRendererBase extends RendererBase {
+public class EventRenderer extends RendererBase {
 
-  private static final Logger LOG = LoggerFactory.getLogger(CommandRendererBase.class);
+  private static final Logger LOG = LoggerFactory.getLogger(EventRenderer.class);
 
   @Override
   public void decode(final FacesContext facesContext, final UIComponent component) {
@@ -77,189 +52,7 @@ public abstract class CommandRendererBas
     }
   }
 
-  @Override
-  public void encodeBegin(final FacesContext facesContext, final UIComponent component) throws IOException {
-
-    final AbstractUICommand command = (AbstractUICommand) component;
-    final String clientId = command.getClientId(facesContext);
-    final boolean disabled = command.isDisabled();
-    final LabelWithAccessKey label = new LabelWithAccessKey(command);
-    final boolean link = command.getLink() != null && !disabled;
-    final String target = command.getTarget();
-
-    final TobagoResponseWriter writer = getResponseWriter(facesContext);
-
-    if (needsExtraSpanElement(command)) {
-      writer.startElement(HtmlElements.SPAN);
-      if (component instanceof AbstractUIButton) { // todo: check if we should differ here
-        writer.writeClassAttribute(BootstrapClass.BTN_GROUP);
-      } else {
-        writer.writeClassAttribute(BootstrapClass.DROPDOWN);
-      }
-    }
-
-    if (link) {
-      writer.startElement(HtmlElements.A);
-    } else {
-      writer.startElement(HtmlElements.BUTTON);
-      writer.writeAttribute(HtmlAttributes.TYPE, HtmlButtonTypes.BUTTON);
-    }
-    writer.writeIdAttribute(clientId);
-    writer.writeNameAttribute(clientId);
-    writer.writeAttribute(HtmlAttributes.DISABLED, disabled);
-
-    if (!disabled) {
-      if (link) {
-        final String href = RenderUtils.generateUrl(facesContext, command);
-        writer.writeAttribute(HtmlAttributes.HREF, href, false);
-        writer.writeAttribute(HtmlAttributes.TARGET, target, false);
-
-        command.setOmit(true);
-      }
-
-      String commands = RenderUtils.getBehaviorCommands(facesContext, command);
-      if (commands == null) { // old way
-        final CommandMap map = new CommandMap(new Command(facesContext, command));
-        commands = JsonUtils.encode(map);
-      }
-      writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-
-      if (label.getAccessKey() != null) {
-        writer.writeAttribute(HtmlAttributes.ACCESSKEY, Character.toString(label.getAccessKey()), false);
-        AccessKeyLogger.addAccessKey(facesContext, label.getAccessKey(), clientId);
-      }
-
-      final int tabIndex = ComponentUtils.getIntAttribute(command, Attributes.tabIndex);
-      if (tabIndex != 0) {
-        writer.writeAttribute(HtmlAttributes.TABINDEX, tabIndex);
-      }
-    }
-
-    HtmlRendererUtils.writeDataAttributes(facesContext, writer, command);
-    writer.writeStyleAttribute(command.getStyle());
-
-    final List<CssItem> cssItems = new ArrayList<CssItem>();
-    if (command.isParentOfCommands()) {
-      // XXX BootstrapClass.NAV_LINK should only be shown inside of UICommands or UIButtons
-      cssItems.add(BootstrapClass.DROPDOWN_TOGGLE);
-      writer.writeAttribute(DataAttributes.TOGGLE, "dropdown", false);
-    }
-    addCssItems(facesContext, command, cssItems);
-    final String title = HtmlRendererUtils.getTitleFromTipAndMessages(facesContext, command);
-    if (title != null) {
-      writer.writeAttribute(HtmlAttributes.TITLE, title, true);
-    }
-
-    cssItems.add(command.getCustomClass());
-
-    writer.writeClassAttribute(
-        Classes.create(command),
-        null,
-        cssItems.toArray(new CssItem[cssItems.size()]));
-
-    final boolean defaultCommand = ComponentUtils.getBooleanAttribute(command, Attributes.defaultCommand);
-    if (defaultCommand) {
-      final AbstractUIFormBase form = ComponentUtils.findAncestor(command, AbstractUIFormBase.class);
-      writer.writeAttribute(DataAttributes.DEFAULT, form.getClientId(facesContext), false);
-    }
-
-/*
-//  image
-
-    String image = command instanceof AbstractUILink ? ((AbstractUILink) command).getImage() : null;
-    if (image != null) {
-      if (ResourceManagerUtils.isAbsoluteResource(image)) {
-        // absolute Path to image : nothing to do
-      } else {
-        image = HtmlRendererUtils.getImageWithPath(facesContext, image, disabled);
-      }
-      HtmlRendererUtils.encodeIconWithLabel(writer, facesContext, image, label, disabled);
-    }
-
-//  label
-    if (label.getLabel() != null) {
-      if (image != null) {
-        writer.write(" "); // separator: e.g. &nbsp;
-      }
-      HtmlRendererUtils.writeLabelWithAccessKey(writer, label);
-    }
-*/
-
-    final String image = ComponentUtils.getStringAttribute(command, Attributes.image);
-    HtmlRendererUtils.encodeIconWithLabel(writer, facesContext, image, label, disabled);
-
-    if (link) {
-      writer.endElement(HtmlElements.A);
-    } else {
-      writer.endElement(HtmlElements.BUTTON);
-    }
-
-    if (command.isParentOfCommands()) {
-      writer.startElement(HtmlElements.UL);
-      writer.writeClassAttribute(BootstrapClass.DROPDOWN_MENU);
-      writer.writeAttribute(HtmlAttributes.ROLE, HtmlRoleValues.MENU.toString(), false);
-    }
-  }
-
-  @Override
-  public boolean getRendersChildren() {
-    return true;
-  }
-
-  @Override
-  public void encodeChildren(final FacesContext facesContext, final UIComponent component) throws IOException {
-
-    final AbstractUICommand command = (AbstractUICommand) component;
-
-    if (command.isParentOfCommands()) {
-      final TobagoResponseWriter writer = getResponseWriter(facesContext);
-
-      for (final UIComponent child : component.getChildren()) {
-        if (child.isRendered()) {
-          writer.startElement(HtmlElements.LI);
-          final CssItem submenu = child instanceof AbstractUICommand && ((AbstractUICommand) child).isParentOfCommands()
-              ? TobagoClass.DROPDOWN_SUBMENU : null;
-          // fixme: this name comes not from bootstrap, using prefix? tobago-command-dropdown-submenu
-          writer.writeClassAttribute(BootstrapClass.DROPDOWN_ITEM, submenu);
-          child.encodeAll(facesContext);
-          writer.endElement(HtmlElements.LI);
-        }
-      }
-    } else {
-      super.encodeChildren(facesContext, component);
-    }
-
-  }
-
-  @Override
-  public void encodeEnd(final FacesContext facesContext, final UIComponent component) throws IOException {
-
-    final AbstractUICommand command = (AbstractUICommand) component;
-    final TobagoResponseWriter writer = getResponseWriter(facesContext);
-
-    if (command.isParentOfCommands()) {
-      writer.endElement(HtmlElements.UL);
-    }
-
-    if (needsExtraSpanElement(command)) {
-      writer.endElement(HtmlElements.SPAN);
-    }
-  }
-
   protected void commandActivated(final UIComponent component) {
     component.queueEvent(new ActionEvent(component));
   }
-
-  protected void addCssItems(
-      final FacesContext facesContext, final AbstractUICommand command, final List<CssItem> collected) {
-  }
-
-  /**
-   * We need an extra SPAN element with position: relative or absolute for positioning the dropdown
-   */
-  private boolean needsExtraSpanElement(AbstractUICommand command) {
-    return !(command.getParent() instanceof AbstractUICommand) // only needed for top elements
-        && !(command.getParent() instanceof UICommands) // not needed inside of tc:commands
-        && command.isParentOfCommands(); // only needed for sub-menus
-  }
 }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/InRenderer.java Thu Nov  3 11:28:25 2016
@@ -132,8 +132,6 @@ public class InRenderer extends LabelLay
     final String commands = RenderUtils.getBehaviorCommands(facesContext, input);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(input, facesContext, writer);
     }
 
     writer.endElement(HtmlElements.INPUT);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PageRenderer.java Thu Nov  3 11:28:25 2016
@@ -233,7 +233,12 @@ public class PageRenderer extends Render
         page.getCustomClass());
     writer.writeIdAttribute(clientId);
     HtmlRendererUtils.writeDataAttributes(facesContext, writer, page);
-    HtmlRendererUtils.renderCommandFacet(page, facesContext, writer);
+
+
+    final String commands = RenderUtils.getBehaviorCommands(facesContext, page);
+    if (commands != null) {
+      writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
+    }
 
     writer.startElement(HtmlElements.FORM);
     if (preventFrameAttacks && !facesContext.getPartialViewContext().isAjaxRequest()) {

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PanelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PanelRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PanelRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/PanelRenderer.java Thu Nov  3 11:28:25 2016
@@ -28,6 +28,7 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.util.ComponentUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 
@@ -65,7 +66,10 @@ public class PanelRenderer extends Panel
       writer.writeAttribute(DataAttributes.RELOAD, Integer.toString(update.getFrequency()), false);
     }
 
-    HtmlRendererUtils.renderCommandFacet(panel, facesContext, writer);
+    final String commands = RenderUtils.getBehaviorCommands(facesContext, panel);
+    if (commands != null) {
+      writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
+    }
     HtmlRendererUtils.encodeContextMenu(facesContext, writer, panel);
 
     encodeHidden(writer, clientId, collapsed);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/ProgressRenderer.java Thu Nov  3 11:28:25 2016
@@ -19,14 +19,15 @@
 
 package org.apache.myfaces.tobago.renderkit.html.standard.standard.tag;
 
-import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.component.UIProgress;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 import org.apache.myfaces.tobago.renderkit.css.BootstrapClass;
 import org.apache.myfaces.tobago.renderkit.css.Classes;
+import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlElements;
 import org.apache.myfaces.tobago.renderkit.html.util.HtmlRendererUtils;
+import org.apache.myfaces.tobago.renderkit.util.RenderUtils;
 import org.apache.myfaces.tobago.webapp.TobagoResponseWriter;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -63,9 +64,9 @@ public class ProgressRenderer extends Re
     writer.writeAttribute(HtmlAttributes.MAX, Double.toString(max), false);
     writer.writeAttribute(HtmlAttributes.VALUE, Double.toString(value), false);
 
-    final UIComponent facet = progress.getFacet("complete");
-    if (value == max && facet instanceof UICommand) {
-      HtmlRendererUtils.renderCommandFacet(progress, facesContext, writer);
+    final String commands = RenderUtils.getBehaviorCommands(facesContext, progress);
+    if (commands != null) {
+      writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
     }
   }
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectBooleanCheckboxRenderer.java Thu Nov  3 11:28:25 2016
@@ -115,8 +115,6 @@ public class SelectBooleanCheckboxRender
     final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
     }
 
     writer.endElement(HtmlElements.INPUT);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyCheckboxRenderer.java Thu Nov  3 11:28:25 2016
@@ -94,8 +94,6 @@ public class SelectManyCheckboxRenderer
       final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
       if (commands != null) {
         writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-      } else { // old
-        HtmlRendererUtils.renderCommandFacet(select, itemId, facesContext, writer);
       }
       writer.endElement(HtmlElements.INPUT);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyListboxRenderer.java Thu Nov  3 11:28:25 2016
@@ -75,8 +75,6 @@ public class SelectManyListboxRenderer e
     final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
     }
     final Object[] values = select.getSelectedValues();
     final String[] submittedValues = getSubmittedValues(select);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectManyShuttleRenderer.java Thu Nov  3 11:28:25 2016
@@ -129,8 +129,6 @@ public class SelectManyShuttleRenderer e
     final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
     }
     HtmlRendererUtils.renderSelectItems(select, items, values, submittedValues, writer, facesContext);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneChoiceRenderer.java Thu Nov  3 11:28:25 2016
@@ -68,8 +68,6 @@ public class SelectOneChoiceRenderer ext
     final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
     }
     HtmlRendererUtils.renderFocus(clientId, select.isFocus(), ComponentUtils.isError(select), facesContext, writer);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneListboxRenderer.java Thu Nov  3 11:28:25 2016
@@ -74,8 +74,6 @@ public class SelectOneListboxRenderer ex
     final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
     }
     HtmlRendererUtils.renderSelectItems(select, items, select.getValue(), (String) select.getSubmittedValue(),
         writer, facesContext);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SelectOneRadioRenderer.java Thu Nov  3 11:28:25 2016
@@ -97,8 +97,6 @@ public class SelectOneRadioRenderer exte
       final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
       if (commands != null) {
         writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-      } else { // old
-        HtmlRendererUtils.renderCommandFacet(select, itemId, facesContext, writer);
       }
       writer.endElement(HtmlElements.INPUT);
 

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/SheetRenderer.java Thu Nov  3 11:28:25 2016
@@ -29,15 +29,15 @@ import org.apache.myfaces.tobago.compone
 import org.apache.myfaces.tobago.component.UIPanel;
 import org.apache.myfaces.tobago.component.UIReload;
 import org.apache.myfaces.tobago.component.UISheet;
-import org.apache.myfaces.tobago.component.Visual;
 import org.apache.myfaces.tobago.context.Markup;
 import org.apache.myfaces.tobago.context.ResourceManagerUtils;
 import org.apache.myfaces.tobago.event.PageAction;
+import org.apache.myfaces.tobago.internal.component.AbstractUIColumn;
 import org.apache.myfaces.tobago.internal.component.AbstractUIColumnBase;
-import org.apache.myfaces.tobago.internal.component.AbstractUIColumnEvent;
 import org.apache.myfaces.tobago.internal.component.AbstractUIColumnNode;
 import org.apache.myfaces.tobago.internal.component.AbstractUIData;
 import org.apache.myfaces.tobago.internal.component.AbstractUIOut;
+import org.apache.myfaces.tobago.internal.component.AbstractUIRow;
 import org.apache.myfaces.tobago.internal.component.AbstractUISheet;
 import org.apache.myfaces.tobago.internal.layout.Cell;
 import org.apache.myfaces.tobago.internal.layout.Grid;
@@ -59,8 +59,6 @@ import org.apache.myfaces.tobago.renderk
 import org.apache.myfaces.tobago.renderkit.css.Style;
 import org.apache.myfaces.tobago.renderkit.css.TobagoClass;
 import org.apache.myfaces.tobago.renderkit.html.Arias;
-import org.apache.myfaces.tobago.renderkit.html.Command;
-import org.apache.myfaces.tobago.renderkit.html.CommandMap;
 import org.apache.myfaces.tobago.renderkit.html.DataAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlAttributes;
 import org.apache.myfaces.tobago.renderkit.html.HtmlButtonTypes;
@@ -160,7 +158,7 @@ public class SheetRenderer extends Rende
       final List<AbstractUIColumnBase> columns = sheet.getAllColumns();
       int i = 0;
       for (final AbstractUIColumnBase column : columns) {
-        if (!(column instanceof AbstractUIColumnEvent)) {
+        if (!(column instanceof AbstractUIRow)) {
           final AbstractUIOut out = (AbstractUIOut) CreateComponentUtils.createComponent(
               facesContext, UIOut.COMPONENT_TYPE, RendererTypes.Out, "_col" + i);
 //        out.setValue(column.getLabel());
@@ -222,7 +220,6 @@ public class SheetRenderer extends Rende
     final UISheet sheet = (UISheet) uiComponent;
     final TobagoResponseWriter writer = getResponseWriter(facesContext);
 
-    final String rowActionId = renderSheetCommands(sheet, facesContext, writer);
     final String sheetId = sheet.getClientId(facesContext);
     final Selectable selectable = sheet.getSelectable();
     final Application application = facesContext.getApplication();
@@ -253,7 +250,7 @@ public class SheetRenderer extends Rende
       writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.HIDDEN);
       final ArrayList<String> encodedRendered = new ArrayList<String>();
       for (AbstractUIColumnBase column : columns) {
-        if (!(column instanceof AbstractUIColumnEvent)) {
+        if (!(column instanceof AbstractUIRow)) {
           encodedRendered.add(Boolean.toString(column.isRendered()));
         }
       }
@@ -389,11 +386,6 @@ public class SheetRenderer extends Rende
         writer.writeAttribute(DataAttributes.ROW_INDEX, rowIndex);
       }
 
-      if (rowActionId != null) {
-        // dirty hack: we need this id in the dom to allow ajax action on columnEvent
-        writer.writeIdAttribute(sheetId + ":" + sheet.getRowIndex() + ":" + rowActionId);
-      }
-
       final boolean selected = selectedRows.contains(rowIndex);
       final String[] rowMarkups = (String[]) sheet.getAttributes().get("rowMarkup");
       Markup rowMarkup = Markup.NULL;
@@ -415,42 +407,55 @@ public class SheetRenderer extends Rende
       }
 
       for (final UIColumn column : columns) {
-        if (column.isRendered() && !(column instanceof AbstractUIColumnEvent)) {
-          writer.startElement(HtmlElements.TD);
-          Markup markup = column instanceof Visual ? ((Visual) column).getMarkup() : Markup.NULL;
-          if (markup == null) {
-            markup = Markup.NULL;
-          }
-          if (rowActionId != null) {
-            markup = markup.add(Markup.CLICKABLE);
+        if (column.isRendered()) {
+          if (column instanceof AbstractUIRow) {
+            final AbstractUIRow row = (AbstractUIRow) column;
+            final String commands = RenderUtils.getBehaviorCommands(facesContext, row);
+            writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
+            writer.writeIdAttribute(row.getClientId(facesContext));
+
+            // todo: Markup.CLICKABLE ???
           }
-          markup = markup.add(getMarkupForAlign(column));
-          writer.writeClassAttribute(Classes.create(sheet, "cell", markup));
+        }
+      }
 
-          if (column instanceof UIColumnSelector) {
-            UIColumnSelector selector = (UIColumnSelector) column;
-            writer.startElement(HtmlElements.INPUT);
-            if (selectable.isSingle()) {
-              writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.RADIO);
-            } else {
-              writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.CHECKBOX);
+      for (final UIColumn column : columns) {
+        if (column.isRendered()) {
+          if (column instanceof AbstractUIColumn) {
+            AbstractUIColumn normalColumn = (AbstractUIColumn) column;
+            writer.startElement(HtmlElements.TD);
+            Markup markup = normalColumn.getMarkup();
+            if (markup == null) {
+              markup = Markup.NULL;
             }
-            writer.writeAttribute(HtmlAttributes.CHECKED, selected);
-            writer.writeAttribute(HtmlAttributes.DISABLED, selector.isDisabled());
-            writer.writeClassAttribute(
-                BootstrapClass.FORM_CHECK_INLINE,
-                Classes.create(sheet, "columnSelector"));
-            writer.endElement(HtmlElements.INPUT);
-          } else if (column instanceof AbstractUIColumnNode) {
-            RenderUtils.encode(facesContext, column);
-          } else {
-            final List<UIComponent> children = sheet.getRenderedChildrenOf(column);
-            for (final UIComponent grandKid : children) {
-              RenderUtils.encode(facesContext, grandKid);
+            markup = markup.add(getMarkupForAlign(normalColumn));
+            writer.writeClassAttribute(Classes.create(sheet, "cell", markup));
+
+            if (normalColumn instanceof UIColumnSelector) {
+              UIColumnSelector selector = (UIColumnSelector) normalColumn;
+              writer.startElement(HtmlElements.INPUT);
+              if (selectable.isSingle()) {
+                writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.RADIO);
+              } else {
+                writer.writeAttribute(HtmlAttributes.TYPE, HtmlInputTypes.CHECKBOX);
+              }
+              writer.writeAttribute(HtmlAttributes.CHECKED, selected);
+              writer.writeAttribute(HtmlAttributes.DISABLED, selector.isDisabled());
+              writer.writeClassAttribute(
+                  BootstrapClass.FORM_CHECK_INLINE,
+                  Classes.create(sheet, "columnSelector"));
+              writer.endElement(HtmlElements.INPUT);
+            } else if (normalColumn instanceof AbstractUIColumnNode) {
+              RenderUtils.encode(facesContext, normalColumn);
+            } else {
+              final List<UIComponent> children = sheet.getRenderedChildrenOf(normalColumn);
+              for (final UIComponent grandKid : children) {
+                RenderUtils.encode(facesContext, grandKid);
+              }
             }
-          }
 
-          writer.endElement(HtmlElements.TD);
+            writer.endElement(HtmlElements.TD);
+          }
         }
       }
 
@@ -472,7 +477,7 @@ public class SheetRenderer extends Rende
       writer.startElement(HtmlElements.TR);
       for (int j = 0; j < columns.size(); j++) {
         final UIColumn column = columns.get(j);
-        if (!(column instanceof AbstractUIColumnEvent)) {
+        if (!(column instanceof AbstractUIRow)) {
           writer.startElement(HtmlElements.TD);
           writer.startElement(HtmlElements.DIV);
           final Integer divWidth = columnWidths.get(j);
@@ -700,7 +705,7 @@ public class SheetRenderer extends Rende
     int i = 0;
     int j = 0;
     for (AbstractUIColumnBase column : columns) {
-      if (!(column instanceof AbstractUIColumnEvent)) {
+      if (!(column instanceof AbstractUIRow)) {
         Integer newValue;
         if (j < samples.size()) {
           newValue = samples.get(j);
@@ -752,7 +757,7 @@ public class SheetRenderer extends Rende
       writer.startElement(HtmlElements.TR);
       for (int j = 0; j < columns.size(); j++) {
         final AbstractUIColumnBase column = columns.get(j);
-        if (column instanceof AbstractUIColumnEvent) {
+        if (column instanceof AbstractUIRow) {
           offset++;
         } else {
          final Cell cell = grid.getCell(j - offset , i);
@@ -928,7 +933,7 @@ public class SheetRenderer extends Rende
 
     int i = 0;
     for (AbstractUIColumnBase column : columns) {
-      if (!(column instanceof AbstractUIColumnEvent)) {
+      if (!(column instanceof AbstractUIRow)) {
         if (column.isRendered()) {
           final Integer width = columnWidths.get(i);
           writeCol(writer, width >= 0 ? width : null);
@@ -991,8 +996,6 @@ public class SheetRenderer extends Rende
     if (target != null) {
       ComponentUtils.setAttribute(command, Attributes.pagingTarget, target);
     }
-//    command.setExecutePartially(new String[]{data.getId()});
-//    command.setRenderPartially(new String[]{data.getId()});
 
     final Locale locale = facesContext.getViewRoot().getLocale();
     final String message = ResourceManagerUtils.getPropertyNotNull(facesContext, "tobago", "sheet" + action.getToken());
@@ -1160,33 +1163,4 @@ public class SheetRenderer extends Rende
       return null;
     }
   }
-
-  private static String renderSheetCommands(
-      final UISheet sheet, final FacesContext facesContext, final TobagoResponseWriter writer) throws IOException {
-    // TODO: TOBAGO-1572
-    final CommandMap commandMap = new CommandMap();
-    String rowActionId = null;
-    for (final UIComponent child : sheet.getChildren()) {
-      if (child instanceof AbstractUIColumnEvent && child.isRendered()) {
-        final AbstractUIColumnEvent columnEvent = (AbstractUIColumnEvent) child;
-        for (UIComponent uiCommand : columnEvent.getChildren()) {
-          if (uiCommand.isRendered()) {
-            if (uiCommand instanceof ClientBehaviorHolder) {
-              RenderUtils.addBehaviorCommands(facesContext, (ClientBehaviorHolder) uiCommand, commandMap);
-              rowActionId = uiCommand.getId();
-            }
-            final String event = columnEvent.getEvent();
-            if (event != null) {
-              commandMap.addCommand(event, new Command(facesContext, uiCommand, null));
-            }
-          }
-        }
-      }
-    }
-    if (!commandMap.isEmpty()) {
-      writer.writeAttribute(DataAttributes.ROW_ACTION, JsonUtils.encode(commandMap), true);
-    }
-    return rowActionId;
-  }
-
 }

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TextareaRenderer.java Thu Nov  3 11:28:25 2016
@@ -100,8 +100,6 @@ public class TextareaRenderer extends La
     final String commands = RenderUtils.getBehaviorCommands(facesContext, input);
     if (commands != null) {
       writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-    } else { // old
-      HtmlRendererUtils.renderCommandFacet(input, facesContext, writer);
     }
 
     HtmlRendererUtils.renderFocus(clientId, input.isFocus(), ComponentUtils.isError(input), facesContext, writer);

Modified: myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java?rev=1767871&r1=1767870&r2=1767871&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java (original)
+++ myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java Thu Nov  3 11:28:25 2016
@@ -128,8 +128,6 @@ public class TreeSelectRenderer extends
       final String commands = RenderUtils.getBehaviorCommands(facesContext, select);
       if (commands != null) {
         writer.writeAttribute(DataAttributes.COMMANDS, commands, true);
-      } else { // old
-        HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
       }
 
       writer.endElement(HtmlElements.INPUT);



Mime
View raw message