use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.
the class BinderPageListController method doPrint.
private void doPrint(UserRequest ureq) {
ControllerCreator ctrlCreator = new ControllerCreator() {
@Override
public Controller createController(UserRequest lureq, WindowControl lwControl) {
BinderOnePageController printCtrl = new BinderOnePageController(lureq, lwControl, binder, ExtendedMediaRenderingHints.toPrint(), true);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, printCtrl);
// dispose controller on layout dispose
layoutCtr.addDisposableChildController(printCtrl);
return layoutCtr;
}
};
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(ctrlCreator);
openInNewBrowserWindow(ureq, layoutCtrlr);
}
use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.
the class QuickstartPortletRunController method event.
public void event(UserRequest ureq, Component source, Event event) {
if (source == quickstartVC) {
String cmd = event.getCommand();
String businessPath = null;
if (cmd.equals("cmd.repo.course")) {
businessPath = "[MyCoursesSite:0]";
} else if (cmd.equals("cmd.repo.catalog")) {
businessPath = "[MyCoursesSite:0][Catalog:0]";
} else if (cmd.equals("cmd.settings")) {
businessPath = "[HomeSite:" + ureq.getIdentity().getKey() + "][mysettings:0]";
} else if (cmd.equals("cmd.buddygroup.new")) {
businessPath = "[GroupsSite:0]";
}
if (StringHelper.containsNonWhitespace(businessPath)) {
NewControllerFactory.getInstance().launch(businessPath, ureq, getWindowControl());
}
} else if (source == helpLink) {
ControllerCreator ctrlCreator = new ControllerCreator() {
public Controller createController(UserRequest lureq, WindowControl lwControl) {
return CourseFactory.createHelpCourseLaunchController(lureq, lwControl);
}
};
// wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
// open in new browser window
PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
pbw.open(ureq);
//
}
}
use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.
the class DisplayPortraitController method showUserInfo.
/**
* Method to open the users visiting card in a new tab. Public to call it also from the patrent controller
* @param ureq
*/
public void showUserInfo(UserRequest ureq) {
ControllerCreator ctrlCreator = new ControllerCreator() {
@Override
public Controller createController(UserRequest lureq, WindowControl lwControl) {
return new UserInfoMainController(lureq, lwControl, portraitIdent, true, false);
}
};
// wrap the content controller into a full header layout
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
// open in new browser window
PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
pbw.open(ureq);
}
use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.
the class TableOfContentController method doPrint.
private void doPrint(UserRequest ureq) {
ControllerCreator ctrlCreator = new ControllerCreator() {
@Override
public Controller createController(UserRequest lureq, WindowControl lwControl) {
BinderOnePageController printCtrl = new BinderOnePageController(lureq, lwControl, binder, ExtendedMediaRenderingHints.toPrint(), true);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, printCtrl);
// dispose controller on layout dispose
layoutCtr.addDisposableChildController(printCtrl);
return layoutCtr;
}
};
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(ctrlCreator);
openInNewBrowserWindow(ureq, layoutCtrlr);
}
use of org.olat.core.gui.control.creator.ControllerCreator in project openolat by klemens.
the class PageRunController method doPrint.
private void doPrint(UserRequest ureq) {
ControllerCreator ctrlCreator = new ControllerCreator() {
@Override
public Controller createController(UserRequest lureq, WindowControl lwControl) {
BinderOnePageController printCtrl = new BinderOnePageController(lureq, lwControl, page, ExtendedMediaRenderingHints.toPrint(), true);
LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, printCtrl);
// dispose controller on layout dispose
layoutCtr.addDisposableChildController(printCtrl);
return layoutCtr;
}
};
ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createPrintPopupLayout(ctrlCreator);
openInNewBrowserWindow(ureq, layoutCtrlr);
}
Aggregations