Reviewers: amitmanjhi, cramsdale,

Description:
Fixes a bug in IE where we swap the tbody but don't update the
childContainer in CellListImpl.


Please review this at http://gwt-code-reviews.appspot.com/529801/show

Affected files:
  M /user/src/com/google/gwt/user/cellview/client/CellListImpl.java
  M /user/src/com/google/gwt/user/cellview/client/CellTable.java


Index: /user/src/com/google/gwt/user/cellview/client/CellListImpl.java
===================================================================
--- /user/src/com/google/gwt/user/cellview/client/CellListImpl.java (revision 8109) +++ /user/src/com/google/gwt/user/cellview/client/CellListImpl.java (working copy)
@@ -44,7 +44,7 @@
   /**
    * The Element that holds the rendered child items.
    */
-  private final Element childContainer;
+  private Element childContainer;

   /**
* The local cache of data in the view. The 0th index in the list corresponds
@@ -279,7 +279,7 @@
       String newContents = sb.toString();
       if (!newContents.equals(lastContents)) {
         lastContents = newContents;
-        renderChildContents(newContents);
+        childContainer = renderChildContents(newContents);
       }
     } else {
       lastContents = null;
@@ -467,9 +467,11 @@
    * Set the contents of the child container.
    *
    * @param html the html to render in the child
-   */
-  protected void renderChildContents(String html) {
+   * @return the new child container
+   */
+  protected Element renderChildContents(String html) {
     childContainer.setInnerHTML(html);
+    return childContainer;
   }

   /**
Index: /user/src/com/google/gwt/user/cellview/client/CellTable.java
===================================================================
--- /user/src/com/google/gwt/user/cellview/client/CellTable.java (revision 8109) +++ /user/src/com/google/gwt/user/cellview/client/CellTable.java (working copy)
@@ -424,8 +424,8 @@
       }

       @Override
-      protected void renderChildContents(String html) {
-        tbody = TABLE_IMPL.renderSectionContents(tbody, html);
+      protected Element renderChildContents(String html) {
+        return (tbody = TABLE_IMPL.renderSectionContents(tbody, html));
       }

       @Override


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to