Search in sources :

Example 31 with WindowControl

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);
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Example 32 with WindowControl

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;
    }
}
Also used : Binder(org.olat.modules.portfolio.Binder) OLATResourceable(org.olat.core.id.OLATResourceable) BinderController(org.olat.modules.portfolio.ui.BinderController) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) BinderConfiguration(org.olat.modules.portfolio.BinderConfiguration)

Example 33 with WindowControl

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();
}
Also used : CommentAndRatingSecurityCallback(org.olat.core.commons.services.commentAndRating.CommentAndRatingSecurityCallback) PageController(org.olat.modules.portfolio.ui.editor.PageController) OLATResourceable(org.olat.core.id.OLATResourceable) ReadOnlyCommentsSecurityCallback(org.olat.modules.portfolio.ui.model.ReadOnlyCommentsSecurityCallback) UserCommentsController(org.olat.core.commons.services.commentAndRating.ui.UserCommentsController) BinderSecurityCallback(org.olat.modules.portfolio.BinderSecurityCallback) WindowControl(org.olat.core.gui.control.WindowControl) Component(org.olat.core.gui.components.Component) WindowControlMocker(org.olat.core.gui.util.WindowControlMocker) PageMetadataController(org.olat.modules.portfolio.ui.PageMetadataController)

Example 34 with WindowControl

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;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) MySharedItemsController(org.olat.modules.portfolio.ui.shared.MySharedItemsController) WindowControl(org.olat.core.gui.control.WindowControl)

Example 35 with WindowControl

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;
}
Also used : OLATResourceable(org.olat.core.id.OLATResourceable) WindowControl(org.olat.core.gui.control.WindowControl)

Aggregations

WindowControl (org.olat.core.gui.control.WindowControl)628 OLATResourceable (org.olat.core.id.OLATResourceable)300 UserRequest (org.olat.core.gui.UserRequest)136 Controller (org.olat.core.gui.control.Controller)70 ControllerCreator (org.olat.core.gui.control.creator.ControllerCreator)68 RepositoryEntry (org.olat.repository.RepositoryEntry)68 StepsMainRunController (org.olat.core.gui.control.generic.wizard.StepsMainRunController)64 ContextEntry (org.olat.core.id.context.ContextEntry)58 Step (org.olat.core.gui.control.generic.wizard.Step)56 StepRunnerCallback (org.olat.core.gui.control.generic.wizard.StepRunnerCallback)56 StepsRunContext (org.olat.core.gui.control.generic.wizard.StepsRunContext)56 BusinessControl (org.olat.core.id.context.BusinessControl)56 LayoutMain3ColsController (org.olat.core.commons.fullWebApp.LayoutMain3ColsController)46 ArrayList (java.util.ArrayList)42 Identity (org.olat.core.id.Identity)38 StateSite (org.olat.core.id.context.StateSite)32 PopupBrowserWindow (org.olat.core.gui.control.generic.popup.PopupBrowserWindow)28 AssertException (org.olat.core.logging.AssertException)24 QuestionsController (org.olat.modules.qpool.ui.QuestionsController)22 List (java.util.List)20