private void doStartPage(UserRequest ureq) { Controller startPageInner = new TUStartController(ureq, getWindowControl(), config); startPage = TitledWrapperHelper.getWrapper( ureq, getWindowControl(), startPageInner, courseNode, "o_tu_icon"); listenTo(startPage); main.setContent(startPage.getInitialComponent()); }
private void doLaunch(UserRequest ureq) { boolean iniframe = config.getBooleanSafe(TUConfigForm.CONFIG_IFRAME); // create the possibility to float CloneableController controller; if (iniframe) { // Do not dispose this controller if the course is closed... IframeTunnelController ifC = new IframeTunnelController(ureq, getWindowControl(), config); controller = ifC; } else { TunnelController tuC = new TunnelController(ureq, getWindowControl(), config); controller = tuC; } listenTo(controller); // create clone wrapper layout CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() { public ControllerCreator createLayoutControllerCreator( UserRequest ureq, final ControllerCreator contentControllerCreator) { return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout( ureq, new ControllerCreator() { @SuppressWarnings("synthetic-access") public Controller createController(UserRequest lureq, WindowControl lwControl) { // wrapp in column layout, popup window needs a layout controller Controller ctr = contentControllerCreator.createController(lureq, lwControl); LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController( lureq, lwControl, null, null, ctr.getInitialComponent(), null); layoutCtr.setCustomCSS( CourseFactory.getCustomCourseCss(lureq.getUserSession(), courseEnv)); layoutCtr.addDisposableChildController(ctr); return layoutCtr; } }); } }; Controller ctrl = TitledWrapperHelper.getWrapper( ureq, getWindowControl(), controller, courseNode, "o_tu_icon"); if (ctrl instanceof CloneableController) { cloneC = new CloneController(ureq, getWindowControl(), (CloneableController) ctrl, clccc); listenTo(cloneC); main.setContent(cloneC.getInitialComponent()); } else { throw new AssertException("Controller must be cloneable"); } }
/** * Constructor for a forum course building block runtime controller * * @param ureq The user request * @param userCourseEnv * @param wContr The current window controller * @param forum The forum to be displayed * @param foCallback The forum security callback * @param foCourseNode The current course node */ public FOCourseNodeRunController( UserRequest ureq, WindowControl wControl, Forum forum, ForumCallback foCallback, FOCourseNode courseNode) { super(ureq, wControl); // set logger on this run controller addLoggingResourceable(LoggingResourceable.wrap(courseNode)); forumCtrl = new ForumController(ureq, getWindowControl(), forum, foCallback, true); listenTo(forumCtrl); Controller titledCtrl = TitledWrapperHelper.getWrapper( ureq, getWindowControl(), forumCtrl, courseNode, "o_fo_icon"); listenTo(titledCtrl); putInitialPanel(titledCtrl.getInitialComponent()); }