writer.writeAttribute("id", clientId, "id");
String styleClass = dashboard.getStyleClass() != null ? Dashboard.CONTAINER_CLASS + " " + dashboard.getStyleClass() : Dashboard.CONTAINER_CLASS;
writer.writeAttribute("class", styleClass, "styleClass");
if(dashboard.getStyle() != null) writer.writeAttribute("style", dashboard.getStyle(), "style");
DashboardModel model = dashboard.getModel();
if(model != null) {
for(DashboardColumn column : model.getColumns()) {
writer.startElement("div", null);
writer.writeAttribute("class", Dashboard.COLUMN_CLASS, null);
for(String widgetId : column.getWidgets()) {
Panel widget = findWidget(widgetId, dashboard);