org.wings.plaf.Utils.write(device, language);
Utils.write(device, language);
    public void write(final Device device,                      final SComponent _c)            throws IOException {        if (!_c.isVisible()) return;        _c.fireRenderEvent(SComponent.START_RENDERING);        final SFrame component = (SFrame) _c;        Browser browser = SessionManager.getSession().getUserAgent();        SFrame frame = (SFrame) component;        String language = SessionManager.getSession().getLocale().getLanguage();        String title = frame.getTitle();        List headers = frame.headers();        String encoding = SessionManager.getSession().getCharacterEncoding();        if (renderXmlDeclaration == null || renderXmlDeclaration.booleanValue()) {            device.print("<?xml version=\"1.0\" encoding=\"");            org.wings.plaf.Utils.write(device, encoding);            device.print("\"?>\n");        }        org.wings.plaf.Utils.writeRaw(device, documentType);        device.print("\n");        device.print("<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"");        org.wings.plaf.Utils.write(device, language);        device.print("\" lang=\"");        org.wings.plaf.Utils.write(device, language);        device.print("\">\n");        device.print("<head>");        if (title != null) {            device.print("<title>");            org.wings.plaf.Utils.write(device, title);            device.print("</title>\n");        }        device.print("<meta http-equiv=\"Content-type\" content=\"text/html; charset=");        org.wings.plaf.Utils.write(device, encoding);        device.print("\"/>\n");        for (Iterator iterator = headers.iterator(); iterator.hasNext();) {            Object next = iterator.next();            if (next instanceof Renderable) {                ((Renderable) next).write(device);            } else {                org.wings.plaf.Utils.write(device, next.toString());            }            device.print("\n");        }        SComponent focus = frame.getFocus();        Object lastFocus = frame.getClientProperty("focus");        if (focus != lastFocus) {            if (lastFocus != null) {                ScriptListener[] scriptListeners = frame.getScriptListeners();                for (int i = 0; i < scriptListeners.length; i++) {                    ScriptListener scriptListener = scriptListeners[i];                    if (scriptListener instanceof FocusScriptListener)                        component.removeScriptListener(scriptListener);                }            }            if (focus != null) {                FocusScriptListener listener = new FocusScriptListener("onload", "requestFocus('" + focus.getName() + "')");                frame.addScriptListener(listener);            }            frame.putClientProperty("focus", focus);        }        // TODO: move this to a dynamic script resource        SToolTipManager toolTipManager = component.getSession().getToolTipManager();        device                .print("<script language=\"JavaScript\" type=\"text/javascript\">\n")                .print("domTT_addPredefined('default', 'caption', false");        if (toolTipManager.isFollowMouse())            device.print(", 'trail', true");        device.print(", 'delay', ").print(toolTipManager.getInitialDelay());        device.print(", 'lifetime', ").print(toolTipManager.getDismissDelay());        device                .print(");\n")                .print("</script>\n");        device.print("</head>\n");        device.print("<body");        org.wings.plaf.Utils.optAttribute(device, "id", frame.getName());        org.wings.plaf.Utils.optAttribute(device, "class", frame.getStyle());        Utils.writeEvents(device, frame);        device.print(">\n");        if (frame.isVisible()) {            frame.getLayout().write(device);        }        device.print("</body></html>\n");        _c.fireRenderEvent(SComponent.DONE_RENDERING);    }