events.putOpt("onsplitterdrag", sidePanel.getOnsplitterdrag());
events.putOpt("oncollapse", sidePanel.getOncollapse());
events.putOpt("onrestore", sidePanel.getOnrestore());
events.putOpt("onmaximize", sidePanel.getOnmaximize());
ScriptBuilder initScript = new ScriptBuilder();
if (Environment.isMozillaFF2(context)) { //fix bug with FF2 and Facelets 1.2 context //todo add isFacelets() filter
initScript.append("O$('").append(clientId).append("').style.visibility = 'hidden';\n");
initScript.append("O$.addLoadEvent( function() {\n");
}
initScript.initScript(context, sidePanel, "O$._initSidePanel",
sidePanel.getAlignment(),
sidePanel.getSize(),
sidePanel.getMinSize(),
sidePanel.getMaxSize(),
sidePanel.isCollapsible(),
sidePanel.isResizable(),
sidePanel.getCollapsed(),
getRolloverClass(context, sidePanel),
getSplitterRolloverClass(context, sidePanel),
new RawScript(events.toString()));
if (Environment.isMozillaFF2(context)) { //fix bug with FF2 and Facelets 1.2 context //todo add isFacelets() filter
initScript.append("O$('").append(clientId).append("').style.visibility = 'visible';\n");
initScript.append("});\n");
}
Rendering.renderInitScript(context, initScript,
Resources.utilJsURL(context),
Resources.internalURL(context, "panel/sidePanel.js"),
Resources.internalURL(context, SIDE_PANEL_UTIL_JS));