You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2012/10/25 23:41:59 UTC

[13/13] git commit: Fix inplace updates to the Grid, which were broken by the change in which zone elements are labeled (as data-container-type="zone")

Fix inplace updates to the Grid, which were broken by the change in which zone elements are labeled (as data-container-type="zone")


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/7015dd01
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/7015dd01
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/7015dd01

Branch: refs/heads/5.4-js-rewrite
Commit: 7015dd01260a461d9d7e3629a9d6c65534feaebc
Parents: 5d4c897
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Thu Oct 25 09:41:06 2012 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Thu Oct 25 09:41:06 2012 -0700

----------------------------------------------------------------------
 .../coffeescript/META-INF/modules/core/grid.coffee |   10 +++++++---
 .../apache/tapestry5/corelib/components/Grid.java  |    2 +-
 2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7015dd01/tapestry-core/src/main/coffeescript/META-INF/modules/core/grid.coffee
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/coffeescript/META-INF/modules/core/grid.coffee b/tapestry-core/src/main/coffeescript/META-INF/modules/core/grid.coffee
index b98fb0a..7210952 100644
--- a/tapestry-core/src/main/coffeescript/META-INF/modules/core/grid.coffee
+++ b/tapestry-core/src/main/coffeescript/META-INF/modules/core/grid.coffee
@@ -19,13 +19,17 @@
 # div[data-zone] around the table, and code here intercepts clicks on links that
 # are inside a div[data-inplace-grid-links].
 #
-define ["core/spi", "core/events"],
+define ["core/spi", "core/events", "core/console"],
 
-  (spi, events) ->
+  (spi, events, console) ->
 
     spi.onDocument "[data-inplace-grid-links] a", ->
 
-      zone = this.findContainer "[data-zone]"
+      zone = this.findContainer "[data-container-type=zone]"
+
+      unless zone
+        console.error "Unable to find containing zone for live update of grid."
+        return false
 
       zone.trigger events.zone.refresh, url: this.attribute "href"
 

http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/7015dd01/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
index d417a43..b637f0b 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Grid.java
@@ -485,7 +485,7 @@ public class Grid implements GridModel
             javaScriptSupport.require("core/zone");
             javaScriptSupport.require("core/grid");
 
-            writer.element("div", "data-zone", "true");
+            writer.element("div", "data-container-type", "zone");
 
             didRenderZoneDiv = true;