if (!component.isRendered())
{
return;
}
HtmlPlanner planner = (HtmlPlanner) component;
ResponseWriter writer = context.getResponseWriter();
//determine the CSS file for the chosen theme
String theme = getTheme(planner);
if (theme == null || theme.length() < 1) theme = "default";
String css = "css/" + theme + ".css";
//add needed CSS and Javascript files to the header
AddResource.addStyleSheet(HtmlPlanner.class, css,
context);
AddResource.addJavaScriptToHeader(HtmlPlanner.class,
"javascript/alphaAPI.js", context);
AddResource.addJavaScriptToHeader(HtmlPlanner.class,
"javascript/domLib.js", context);
AddResource.addJavaScriptToHeader(HtmlPlanner.class,
"javascript/domTT.js", context);
AddResource.addJavaScriptToHeader(HtmlPlanner.class,
"javascript/fadomatic.js", context);
int numberOfRows = planner.getModel().numberOfEntities();
int gridHeight = (numberOfRows * 22) + 3 + 47;
writer.startElement(HTML.DIV_ELEM, planner);
writer.writeAttribute(HTML.CLASS_ATTR, "planner", null);