Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.WindowControl


  }
 
   
  private static WindowControl updateBusinessPath(UserRequest ureq, WindowControl wControl) {
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ureq.getIdentity());
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
    return bwControl;
  }
View Full Code Here


      String businessPath = (String) usess.removeEntryFromNonClearedStore(AUTHDISPATCHER_BUSINESSPATH);
      if (businessPath != null) {
        BusinessControl bc = BusinessControlFactory.getInstance().createFromString(businessPath);
        ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute("AUTHCHIEFCONTROLLER");

        WindowControl wControl = cc.getWindowControl();
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, wControl);
        NewControllerFactory.getInstance().launch(ureq, bwControl)
        // render the window
        Window w = cc.getWindow();
        w.dispatchRequest(ureq, true); // renderOnly
        return;
      }
     
      // 1. check for direct launch urls, see org.olat.core.dispatcher.jumpin.JumpinConfig
      if (!ureq.isValidDispatchURI()) {
        JumpInReceptionist jh = JumpInManager.getInstance().getJumpInReceptionist(ureq);
        if (jh == null) {
          // found no JumpInManager => try with new 5.1 JumpIn-Resource URL
          String uri = ureq.getNonParsedUri();
          if (uri.startsWith(JumpInManager.CONST_EXTLINK)) {
            String resourceUrl = ureq.getParameter(JumpInManager.CONST_RESOURCE_URL);
            if (resourceUrl != null) {
              // attach the launcher data
              BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
              try {
                // get main window and dynamic tabs
                // brasato:: ChiefController cc = Windows.getWindows(usess).getWindowManager().getMainChiefController();
                ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);

                // brasato:: todo: cc = Windows.getWindows(usess).getRegisteredJumpChiefController();
                WindowControl wControl = cc.getWindowControl();
                WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, wControl);
                NewControllerFactory.getInstance().launch(ureq, bwControl)
                // render the window
                Window w = cc.getWindow();
                w.dispatchRequest(ureq, true); // renderOnly
                return;
              } catch (Exception ex) {
                // sendNotFound         
              }
            }
          }
          DispatcherAction.sendNotFound(request.getRequestURI(), response);
          return;
        }
       
        // handler found e.g. for repo/go or cata/go or alike
        OLATResourceable ores = jh.getOLATResourceable();     
        String title = jh.getTitle();

        // get main window and dynamic tabs
        // brasato:: ChiefController cc = Windows.getWindows(usess).getMainOlatChiefController();
        ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);

        if (cc == null) throw new AssertException("logged in, but no window/Chiefcontroller 'olatmain' found!");
        WindowControl wControl = cc.getWindowControl();

        // add to tabs
        DTabs dts = (DTabs)wControl.getWindowBackOffice().getWindow().getAttribute(D_TABS);
        synchronized (dts) { //o_clusterok per:fj user session
          DTab dt = dts.getDTab(ores);
          if (dt == null) {
            // no dynamic tab found, lets see if the ores implements the SiteInstance interface.
            boolean isSiteInstance;
View Full Code Here

      contentP.pushContent(bookmarkController.getInitialComponent());
    } else if (cmd.equals(ACTION_CALENDAR)) { // popup calendar
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(courseRepositoryEntry);
          WindowControl llwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, lwControl);
          CourseCalendarController calendarController = new CourseCalendarController(lureq, llwControl, course);         
          // use a one-column main layout
          LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, llwControl, null, null, calendarController.getInitialComponent(), null);
          layoutCtr.setCustomCSS(CourseFactory.getCustomCourseCss(lureq.getUserSession(), uce.getCourseEnvironment()));
          layoutCtr.addDisposableChildController(calendarController); // dispose calendar on layout dispose
View Full Code Here

       
        // calculate the new businesscontext for the coursenode being called.
        //FIXME:pb:mannheim discussion should not be "this.ores" -> may be the "forum" should go in here.
        //
        ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(forum);
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());
       
        discussionContent.put("articleforum", ForumUIFactory.getStandardForumController(ureq, bwControl, forum, forumCallback).getInitialComponent());
      }
    } else if (source == wikiEditForm) {
      /*************************************************************************
 
View Full Code Here

  private void adjustBusinessControlPath(UserRequest ureq, Message m) {
    ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrap(m));
    OLATResourceable ores = OresHelper.createOLATResourceableInstance(Message.class,m.getKey());
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
   
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl());   
   
    //Simple way to "register" the new ContextEntry although only a VelocityPage was flipped.
    Controller dummy = new BasicController(ureq, bwControl) {
   
      @Override
View Full Code Here

        String uri = url.substring(pathIndex + 5, url.length() - 1);
        RedirectMediaResource rsrc = new RedirectMediaResource(uri);
        ureq.getDispatchResult().setResultingMediaResource(rsrc);
      } else {
        BusinessControl bc = BusinessControlFactory.getInstance().createFromString(url);
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, getWindowControl());
        NewControllerFactory.getInstance().launch(ureq, bwControl);
      }
    } catch (Exception ex) {
      log.debug("Document not found");
      getWindowControl().setWarning(getTranslator().translate("error.resource.could.not.found"));
View Full Code Here

 
   
    // build up the context path
    OLATResourceable businessOres = re;
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
 
    MainLayoutController ctrl = handler.getLaunchController(re.getOlatResource(), initialViewIdentifier, ureq, bwControl);
    if (ctrl == null) throw new AssertException("could not create controller for repositoryEntry "+re);
    if (ctrl instanceof MainLayoutController) {
      return ctrl;     
View Full Code Here

   
    // build up the context path
    OLATResourceable businessOres = businessGroup;
    ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
    WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
   
   
    String bgTyp = businessGroup.getType();
    if (BusinessGroup.TYPE_BUDDYGROUP.equals(bgTyp)) {
      BGConfigFlags flags = BGConfigFlags.createBuddyGroupDefaultFlags();
View Full Code Here

      mainPanel.setContent(main);
    } else if (ACTIVITY_MENUSELECT_FORUM.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFORUM, OlatResourceableType.forum));
      SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFORUM);
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFORUM);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createForumController(ureq, bwControl, isAdmin, ureq.getUserSession().getRoles().isGuestOnly(),  sc);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_CHAT.equals(cmd)) {
      collabToolCtr = collabTools.createChatController(ureq, getWindowControl(), this.businessGroup.getName());
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_CALENDAR.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLCAL, OlatResourceableType.calendar));
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLCAL);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createCalendarController(ureq, bwControl, this.businessGroup, isAdmin);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_INFORMATION.equals(cmd)) {
      collabToolCtr = collabTools.createNewsController(ureq, getWindowControl());
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_FOLDER.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLFOLDER, OlatResourceableType.sharedFolder));

      SubscriptionContext sc = new SubscriptionContext(businessGroup, INITVIEW_TOOLFOLDER);
     
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the forum clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLFOLDER);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);

      collabToolCtr = collabTools.createFolderController(ureq, bwControl, sc);
      listenTo(collabToolCtr);
      mainPanel.setContent(collabToolCtr.getInitialComponent());
    } else if (ACTIVITY_MENUSELECT_MEMBERSLIST.equals(cmd)) {
      doShowMembers(ureq);
    } else if (ACTIVITY_MENUSELECT_CONTACTFORM.equals(cmd)) {
      doContactForm(ureq);
    } else if (ACTIVITY_MENUSELECT_ADMINISTRATION.equals(cmd)) {
      doAdministration(ureq);
    } else if (ACTIVITY_MENUSELECT_SHOW_RESOURCES.equals(cmd)) {
      doShowResources(ureq);
    } else if (ACTIVITY_MENUSELECT_WIKI.equals(cmd)) {
      addLoggingResourceable(LoggingResourceable.wrap(ORES_TOOLWIKI, OlatResourceableType.wiki));
      WindowControl bwControl = getWindowControl();
      // calculate the new businesscontext for the wiki clicked
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ORES_TOOLWIKI);
      bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, bwControl);
      ThreadLocalUserActivityLogger.addLoggingResourceInfo(LoggingResourceable.wrapWikiOres(ce.getOLATResourceable()));
View Full Code Here

                // get main window and dynamic tabs
                // brasato:: ChiefController cc = Windows.getWindows(usess).getWindowManager().getMainChiefController();
                ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);

                // brasato:: todo: cc = Windows.getWindows(usess).getRegisteredJumpChiefController();
                WindowControl wControl = cc.getWindowControl();
                WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, wControl);
                NewControllerFactory.getInstance().launch(ureq, bwControl)
                // render the window
                Window w = cc.getWindow();
                w.dispatchRequest(ureq, true); // renderOnly
                return;
              } catch (Exception ex) {
                // sendNotFound         
              }
            }
          }
          DispatcherAction.sendNotFound(request.getRequestURI(), response);
          return;
        }
        // handler found e.g. for repo/go
        OLATResourceable ores = jh.getOLATResourceable();
        String title = jh.getTitle();

        // get main window and dynamic tabs
        // brasato:: ChiefController cc = Windows.getWindows(usess).getMainOlatChiefController();
        ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute(AUTHCHIEFCONTROLLER);

        if (cc == null) throw new AssertException("logged in, but no window/Chiefcontroller 'olatmain' found!");
        WindowControl wControl = cc.getWindowControl();

        // add to tabs
        DTabs dts = (DTabs)wControl.getWindowBackOffice().getWindow().getAttribute(D_TABS);
        synchronized (dts) { //o_clusterok per user session
          DTab dt = dts.getDTab(ores);
          if (dt == null) {
            // does not yet exist -> create and add
            dt = dts.createDTab(ores, title);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.WindowControl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.