use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class ForumController method doMarkedView.
private void doMarkedView(UserRequest ureq, Message thread, Message scrollTo) {
cleanUpMessageViews();
OLATResourceable ores = OresHelper.createOLATResourceableInstance("Message", thread.getKey());
WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ores, null, getWindowControl());
OLATResourceable markedOres = OresHelper.createOLATResourceableInstance("Marked", 0l);
WindowControl bbwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(markedOres, null, bwControl);
viewCtrl = new MessageListController(ureq, bbwControl, forum, focallback);
viewCtrl.loadThread(ureq, thread);
viewCtrl.scrollTo(scrollTo);
viewCtrl.doShowMarked(ureq);
listenTo(viewCtrl);
putContent(viewCtrl);
addToHistory(ureq, viewCtrl);
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class MySharedItemsController method doSelectBinder.
private BinderController doSelectBinder(UserRequest ureq, MySharedItemRow row) {
Binder binder = portfolioService.getBinderByKey(row.getBinderKey());
if (binder == null) {
showWarning("warning.portfolio.not.found");
return null;
} else {
removeAsListenerAndDispose(binderCtrl);
portfolioService.updateBinderUserInformations(binder, getIdentity());
OLATResourceable binderOres = OresHelper.createOLATResourceableInstance("Binder", binder.getKey());
WindowControl swControl = addToHistory(ureq, binderOres, null);
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getCallbackForOwnedBinder(binder);
BinderConfiguration config = BinderConfiguration.createConfig(binder);
binderCtrl = new BinderController(ureq, swControl, stackPanel, secCallback, binder, config);
String displayName = StringHelper.escapeHtml(binder.getTitle());
stackPanel.pushController(displayName, binderCtrl);
return binderCtrl;
}
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class ExportBinderAsCPResource method exportPage.
private void exportPage(Page page, ZipOutputStream zout) throws IOException {
WindowControl mockwControl = new WindowControlMocker();
BinderSecurityCallback secCallback = BinderSecurityCallbackFactory.getReadOnlyCallback();
PageMetadataController metadatCtrl = new PageMetadataController(ureq, mockwControl, secCallback, page);
PageController pageCtrl = new PageController(ureq, mockwControl, new PortfolioPageProvider(page), ExtendedMediaRenderingHints.toPrint());
pageCtrl.loadElements(ureq);
CommentAndRatingSecurityCallback commentSecCallback = new ReadOnlyCommentsSecurityCallback();
OLATResourceable ores = OresHelper.createOLATResourceableInstance(Page.class, page.getKey());
UserCommentsController commentsCtrl = new UserCommentsController(ureq, mockwControl, ores, null, commentSecCallback);
Component metadata = metadatCtrl.getInitialComponent();
Component component = pageCtrl.getInitialComponent();
Component comments = commentsCtrl.getNumOfComments() > 0 ? commentsCtrl.getInitialComponent() : null;
String html = createResultHTML(metadata, component, comments, "o_page_export");
html = exportMedia(html, zout);
convertToZipEntry(zout, pageFilename(page), html);
pageCtrl.dispose();
metadatCtrl.dispose();
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class PortfolioHomeController method doOpenMySharedItems.
private MySharedItemsController doOpenMySharedItems(UserRequest ureq) {
removeAsListenerAndDispose(mySharedItemsCtrl);
stackPanel.popUpToRootController(ureq);
OLATResourceable pagesOres = OresHelper.createOLATResourceableInstance("MySharedItems", 0l);
WindowControl swControl = addToHistory(ureq, pagesOres, null);
mySharedItemsCtrl = new MySharedItemsController(ureq, swControl, stackPanel);
listenTo(mySharedItemsCtrl);
stackPanel.pushController(translate("my.shared.items"), mySharedItemsCtrl);
return mySharedItemsCtrl;
}
use of org.olat.core.gui.control.WindowControl in project OpenOLAT by OpenOLAT.
the class PortfolioHomeController method doOpenMediaCenter.
private MediaCenterController doOpenMediaCenter(UserRequest ureq) {
removeAsListenerAndDispose(mediaCenterCtrl);
stackPanel.popUpToRootController(ureq);
OLATResourceable pagesOres = OresHelper.createOLATResourceableInstance("MediaCenter", 0l);
WindowControl swControl = addToHistory(ureq, pagesOres, null);
mediaCenterCtrl = new MediaCenterController(ureq, swControl, stackPanel);
listenTo(mediaCenterCtrl);
stackPanel.pushController(translate("media.center"), mediaCenterCtrl);
return mediaCenterCtrl;
}
Aggregations