device.print("<button name=\"");
writeButtonStart(device, table, table.getToggleSelectionParameter(r, -1)); device.print(" type=\"submit\" name=\"");
    public void writeContent(final Device device, final SComponent _c)            throws IOException {        final STable component = (STable) _c;        STable table = (STable) component;        boolean childSelectorWorkaround = !component.getSession().getUserAgent().supportsCssChildSelector();        SDimension intercellPadding = table.getIntercellPadding();        SDimension intercellSpacing = table.getIntercellSpacing();        device.print("<table");        Utils.printCSSInlineFullSize(device, component.getPreferredSize());        // TODO: border="" should be obsolete        // TODO: cellspacing and cellpadding may be in conflict with border-collapse        /* Tweaking: CG configured to have a fixed border="xy" width */        Utils.optAttribute(device, "border", fixedTableBorderWidth);        Utils.optAttribute(device, "cellspacing", ((intercellSpacing != null) ? ""+intercellSpacing.getIntWidth() : null));        Utils.optAttribute(device, "cellpadding", ((intercellPadding != null) ? ""+intercellPadding.getIntHeight() : null));        device.print(">\n");        /*        * get viewable area        */        int startRow = 0;        int startCol = 0;        int endRow = table.getRowCount();        int endCol = table.getColumnCount();        Rectangle viewport = table.getViewportSize();        if (viewport != null) {            startRow = viewport.y;            startCol = viewport.x;            endRow = Math.min(startRow + viewport.height, endRow);            endCol = Math.min(startCol + viewport.width, endCol);        }        SCellRendererPane rendererPane = table.getCellRendererPane();        /*        * render the header         */        SListSelectionModel selectionModel = table.getSelectionModel();        boolean numbering = selectionModel.getSelectionMode() != SListSelectionModel.NO_SELECTION && table.isEditable();        boolean showAsFormComponent = table.getShowAsFormComponent();        if (table.isHeaderVisible()) {            device.print("<thead><tr>\n");            if (numbering)                device.print("<th></th>");            for (int c = startCol; c < endCol; c++)                writeHeaderCell(device, table, rendererPane, table.convertColumnIndexToModel(c));            device.print("</tr></thead>\n");        }        device.print("<tbody>\n");        for (int r = startRow; r < endRow; r++) {            device.print("<tr");            if (selectionModel.isSelectedIndex(r))                device.print(" selected=\"true\"");            if (r % 2 != 0)                device.print(" odd=\"true\">");            else                device.print(" even=\"true\">");            if (numbering) {                device.print("<td col=\"numbering\"");                if (childSelectorWorkaround)                    Utils.childSelectorWorkaround(device, "numbering");                device.print(">");                if (showAsFormComponent) {                    device.print("<button name=\"");                    Utils.write(device, Utils.event(table));                    device.print("\" value=\"");                    Utils.write(device, table.getToggleSelectionParameter(r, -1));                    device.print("\">");                    device.print(r);                    device.print("</button>");                } else {                    RequestURL selectionAddr = table.getRequestURL();                    selectionAddr.addParameter(Utils.event(table),                            table.getToggleSelectionParameter(r, -1));                    device.print("<a href=\"");                    Utils.write(device, selectionAddr.toString());                    device.print("\">");                    device.print(r);                    device.print("</a>");                }                device.print("</td>");            }            for (int c = startCol; c < endCol; c++)                writeCell(device, table, rendererPane, r, table.convertColumnIndexToModel(c));            device.print("</tr>\n");        }        device.print("</tbody>\n");        device.print("</table>\n");    }