org.wings.io.StringBufferDevice stringBufferDevice = getStringBufferDevice(); Utils.printCSSInlineStyleAttributes(stringBufferDevice, cellRenderer); Utils.optAttribute(device, "style", stringBufferDevice.toString());
StringBuffer buffer = Utils.generateCSSComponentInlineStyle(cellRenderer); Utils.optAttribute(device, "style", buffer.toString());
    protected void writeFormComboBox(Device device, SComboBox component) throws IOException {        device.print("<select size=\"1\"");        Utils.optAttribute(device, "name", Utils.event(component));        Utils.optAttribute(device, "tabindex", component.getFocusTraversalIndex());        Utils.printCSSInlineFullSize(device, component.getPreferredSize());        if (!component.isEnabled())            device.print(" disabled=\"true\"");        if (component.isFocusOwner())            Utils.optAttribute(device, "focus", component.getName());        Utils.writeEvents(device, component);        device.print(">\n");        javax.swing.ComboBoxModel model = component.getModel();        int size = model.getSize();        int selected = component.getSelectedIndex();        SListCellRenderer renderer = component.getRenderer();        for (int i = 0; i < size; i++) {            SComponent cellRenderer = null;            if (renderer != null) {                cellRenderer = renderer.getListCellRendererComponent(component, model.getElementAt(i), false, i);            } else {                device.print("<!--renderer==null-->");            }            device.print("<option");            Utils.optAttribute(device, "value", component.getSelectionParameter(i));            if (selected == i) {                device.print(" selected=\"selected\"");            }            if (cellRenderer != null) {                Utils.optAttribute(device, "title", cellRenderer.getToolTipText());                org.wings.io.StringBufferDevice stringBufferDevice = getStringBufferDevice();                Utils.printCSSInlineStyleAttributes(stringBufferDevice, cellRenderer);                Utils.optAttribute(device, "style", stringBufferDevice.toString());            }            device.print(">\n"); //option            if (cellRenderer != null) {                // Hack: remove all tags, because in form selections, looks ugly.                org.wings.io.StringBufferDevice string = getStringBufferDevice();                cellRenderer.write(string);                char[] chars = string.toString().toCharArray();                int pos = 0;                for (int c = 0; c < chars.length; c++) {                    switch (chars[c]) {                        case '<':                            device.print(chars, pos, c - pos);                            break;                        case '>':                            pos = c + 1;                    }                }                device.print(chars, pos, chars.length - pos);            } else {                device.print("<!--cellrenderer==null, use toString-->");                device.print(model.getElementAt(i).toString());            }            device.print("</option>");        }        device.print("</select>");        // util method        device.print("<input type=\"hidden\"");        Utils.optAttribute(device, "name", Utils.event(component));        Utils.optAttribute(device, "value", -1);        device.print("/>");    }