static void replaceAllChildren(Widget widget, Element childContainer, SafeHtml html) {
        // If the widget is not attached, attach an event listener so we can catch
        // synchronous load events from cached images.
        if (!widget.isAttached()) {
            DOM.setEventListener(widget.getElement(), widget);
        }

        // Render the HTML.
        childContainer.setInnerSafeHtml(CellBasedWidgetImpl.get().processHtml(html));

        // Detach the event listener.
        if (!widget.isAttached()) {
            DOM.setEventListener(widget.getElement(), null);
        }
    }
Convenience method to replace all children of a Widget.

@param widget the widget who's contents will be replaced
@param childContainer the container that holds the contents
@param html the html to set
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractHasData.java