String clientId = component.getClientId(context);
writer.startElement(HtmlConstants.SCRIPT_ELEM, null);
writer.writeAttribute(HtmlConstants.TYPE_ATTR, "text/javascript", "type");
final Map<String, Object> options = getOptions(context, (AbstractDashboard) component);
options.put("submitEventFunction", createSubmitEventFunction(context, (AbstractDashboard) component));
writer.writeText(new JSObject("RichFaces.ui.Dashboard", clientId, options), null);
writer.writeText(";", null);
writer.endElement(HtmlConstants.SCRIPT_ELEM);
writer.startElement(HtmlConstants.DIV_ELEM, component);
writer.writeAttribute(HtmlConstants.CLASS_ATTRIBUTE, "rf-db-clr", HtmlConstants.CLASS_ATTRIBUTE);
writer.endElement(HtmlConstants.DIV_ELEM);