myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r1759771 - in /myfaces/tobago/trunk: tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/ tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/
Date Thu, 08 Sep 2016 09:24:10 GMT
Author: lofwyr
Date: Thu Sep  8 09:24:10 2016
New Revision: 1759771

URL: http://svn.apache.org/viewvc?rev=1759771&view=rev
Log:
TOBAGO-1524: Use standard AJAX mechanism 
* hotfix for tc:treeSelect

Modified:
    myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.xhtml
    myfaces/tobago/trunk/tobago-theme/tobago-theme-standard/src/main/java/org/apache/myfaces/tobago/renderkit/html/standard/standard/tag/TreeSelectRenderer.java

Modified: myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.xhtml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.xhtml?rev=1759771&r1=1759770&r2=1759771&view=diff
==============================================================================
--- myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.xhtml
(original)
+++ myfaces/tobago/trunk/tobago-example/tobago-example-demo/src/main/webapp/content/20-component/090-tree/01-select/tree-select.xhtml
Thu Sep  8 09:24:10 2016
@@ -42,7 +42,7 @@
           <tc:treeNode>
             <tc:treeIndent/>
             <tc:treeSelect label="#{node.userObject.name}" value="#{node.userObject.selected}">
-              <f:ajax execute="selectedNodesOutput" render="selectedNodesOutput"/>
+              <f:ajax render=":::selectedNodesOutput"/>
             </tc:treeSelect>
           </tc:treeNode>
         </tc:tree>

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=1759771&r1=1759770&r2=1759771&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 Sep  8 09:24:10 2016
@@ -27,10 +27,12 @@ import org.apache.myfaces.tobago.interna
 import org.apache.myfaces.tobago.model.Selectable;
 import org.apache.myfaces.tobago.renderkit.RendererBase;
 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.HtmlInputTypes;
 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;
@@ -120,7 +122,14 @@ public class TreeSelectRenderer extends
       writer.writeAttribute(HtmlAttributes.VALUE, id, false);
       writer.writeIdAttribute(id);
       writer.writeAttribute(HtmlAttributes.CHECKED, checked);
-      HtmlRendererUtils.renderCommandFacet(select, facesContext, writer);
+
+      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