public TableSectionElement convertToSectionElement(AbstractCellTable<?> table,
                                                           String sectionTag, SafeHtml rowHtml) {
            // Attach an event listener so we can catch synchronous load events from
            // cached images.
            DOM.setEventListener(tmpElem, table);

            /*
             * Render the rows into a table.
             *
             * IE doesn't support innerHtml on a TableSection or Table element, so we
             * generate the entire table. We do the same for all browsers to avoid any
             * future bugs, since setting innerHTML on a table section seems brittle.
             */
            sectionTag = sectionTag.toLowerCase(Locale.ROOT);
            if ("tbody".equals(sectionTag)) {
                tmpElem.setInnerSafeHtml(template.tbody(rowHtml));
            } else if ("thead".equals(sectionTag)) {
                tmpElem.setInnerSafeHtml(template.thead(rowHtml));
            } else if ("tfoot".equals(sectionTag)) {
                tmpElem.setInnerSafeHtml(template.tfoot(rowHtml));
            } else {
                throw new IllegalArgumentException("Invalid table section tag: " + sectionTag);
            }
            TableElement tableElem = tmpElem.getFirstChildElement().cast();

            // Detach the event listener.
            DOM.setEventListener(tmpElem, null);

            // Get the section out of the table.
            if ("tbody".equals(sectionTag)) {
                return tableElem.getTBodies().getItem(0);
            } else if ("thead".equals(sectionTag)) {
                return tableElem.getTHead();
            } else if ("tfoot".equals(sectionTag)) {
                return tableElem.getTFoot();
            } else {
                throw new IllegalArgumentException("Invalid table section tag: " + sectionTag);
            }
        }
Convert the rowHtml into Elements wrapped by the specified table section.

@param table      the {@link AbstractCellTable}
@param sectionTag the table section tag
@param rowHtml    the Html for the rows
@return the section element
stroom-core-client-widget/src/main/java/com/google/gwt/user/cellview/client/AbstractCellTable.java