public final void replaceChildren(AbstractCellTable<?> table, TableSectionElement section,
                                          SafeHtml html, int startIndex, int childCount) {
            // If the widget is not attached, attach an event listener so we can catch
            // synchronous load events from cached images.
            if (!table.isAttached()) {
                DOM.setEventListener(table.getElement(), table);
            }

            // Remove the section from the tbody.
            Element parent = section.getParentElement();
            Element nextSection = section.getNextSiblingElement();
            detachSectionElement(section);

            // Remove all children in the range.
            final int absEndIndex = table.getPageStart() + startIndex + childCount;

            TableRowElement insertBefore = table.getChildElement(startIndex).cast();
            if (table.legacyRenderRowValues) {
                int count = 0;
                while (insertBefore != null && count < childCount) {
                    Element next = insertBefore.getNextSiblingElement();
                    section.removeChild(insertBefore);
                    insertBefore = (next == null)
                            ? null
                            : next.<TableRowElement>cast();
                    count++;
                }
            } else {
                while (insertBefore != null
                       && table.tableBuilder.getRowValueIndex(insertBefore) < absEndIndex) {
                    Element next = insertBefore.getNextSiblingElement();
                    section.removeChild(insertBefore);
                    insertBefore = (next == null)
                            ? null
                            : next.<TableRowElement>cast();
                }
            }

            // Add new child elements.
            TableSectionElement newSection = convertToSectionElement(table, section.getTagName(), html);
            Element newChild = newSection.getFirstChildElement();
            while (newChild != null) {
                Element next = newChild.getNextSiblingElement();
                section.insertBefore(newChild, insertBefore);
                newChild = next;
            }

            /*
             * Reattach the section. If next section is null, the section will be
             * appended instead.
             */
            reattachSectionElement(parent, section, nextSection);

            // Detach the event listener.
            if (!table.isAttached()) {
                DOM.setEventListener(table.getElement(), null);
            }
        }
Replace a set of row values with newly rendered values.
<p>
This method does not necessarily perform a one to one replacement. Some
row values may be rendered as multiple row elements, while others are
rendered as only one row element.

@param table      the {@link AbstractCellTable}
@param section    the {@link TableSectionElement} to replace
@param html       the html of a table section element containing the rows
@param startIndex the start index to replace
@param childCount the number of row values to replace
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractCellTable.java