static void replaceChildren(Widget widget, Element childContainer, Element newChildren,
                                int start, SafeHtml html) {
        // Get the first element to be replaced.
        int childCount = childContainer.getChildCount();
        Element toReplace = null;
        if (start < childCount) {
            toReplace = childContainer.getChild(start).cast();
        }

        // Replace the elements.
        int count = newChildren.getChildCount();
        for (int i = 0; i < count; i++) {
            if (toReplace == null) {
                // The child will be removed from tmpElem, so always use index 0.
                childContainer.appendChild(newChildren.getChild(0));
            } else {
                Element nextSibling = toReplace.getNextSiblingElement();
                childContainer.replaceChild(newChildren.getChild(0), toReplace);
                toReplace = nextSibling;
            }
        }
    }
Convenience method to convert the specified HTML into DOM elements and
replace the existing elements starting at the specified index. If the
number of children specified exceeds the existing number of children, the
remaining children should be appended.

@param widget the widget who's contents will be replaced
@param childContainer the container that holds the contents
@param newChildren an element containing the new children
@param start the start index to replace
@param html the HTML to convert
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractHasData.java