public BaseChiefController(UserRequest ureq) {
setLoggingUserRequest(ureq);
translator = Util.createPackageTranslator(this.getClass(), ureq.getLocale());
// main layout/structure
mainPanel = new Panel("brasatoMainPanel");
mainPanel.setDomReplaceable(false);
mainvc = new VelocityContainer("baseccvc", VELOCITY_ROOT + "/body.html", translator, this);
// disallow wrapping of divs around the panel and the main velocity page
// (since it contains the "<html><head... intro of the html page,
// and thus has better to be replaced as a whole (new page load) instead of
// a dom replacement)
mainvc.setDomReplaceable(false);
// component-id of mainPanel for the window id
mainvc.contextPut("o_winid", String.valueOf(mainPanel.getDispatchID()));
// add jsMath library
mainvc.contextPut("jsMathEnabled", Boolean.valueOf(jsMathEnabled));
mainPanel.setContent(mainvc);
WindowManager winman = Windows.getWindows(ureq).getWindowManager();
wbo = winman.createWindowBackOffice("basechiefwindow", this);
Window w = wbo.getWindow();
// part that builds the css and javascript lib includes (<script src="..."> and <rel link
// e.g.
// <script type="text/javascript" src="/demo/g/2/js/jscalendar/calendar.js"></script>
mainvc.put("jsCssRawHtmlHeader", w.getJsCssRawHtmlHeader());
// control part for ajax-communication. returns an empty panel if ajax is not enabled, so that ajax can be turned on on the fly for development mode
jsServerC = wbo.createAJAXController(ureq);
mainvc.put("jsServer", jsServerC.getInitialComponent());
// init with no bookmark (=empty bc)
mainvc.contextPut("o_bc", "");
// the current language; used e.g. by screenreaders
mainvc.contextPut("lang", ureq.getLocale().toString());
// the current GUI theme and the global settings that contains the
// font-size. both are pushed as objects so that window.dirty always reads
// out the correct value
mainvc.contextPut("theme", w.getGuiTheme());
mainvc.contextPut("globalSettings", winman.getGlobalSettings());
// content panel
contentPanel = new Panel("olatContentPanel");
mainvc.put("olatContentPanel", contentPanel);
mainvc.contextPut("o_winid", Long.valueOf(w.getDispatchID()));
Version v = (Version) CoreSpringFactory.getBean("org.olat.core.Version");
mainvc.contextPut("buildversion", v.getVersion());