Examples of WindowControl


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

 
   
    // 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

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

   
    // 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

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

      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

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

                // 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

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

      if (dt == null) return;
     
      // build up the context path
      OLATResourceable businessOres = repositoryEntry;
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(businessOres);
      WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, dt.getWindowControl());
     
      Controller ctrl = typeToLaunch.getLaunchController(ores, null, ureq, bwControl);
      // if resource is an image, PDF or eq. (e.g. served by resulting media request), no controller is returned.
      // FIXME:fj:test this
      if (ctrl == null) return;
View Full Code Here

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

        @Override
        public Long getResourceableId() { return 0l; }
        @Override
        public String getResourceableTypeName() { return "NewIdentityCreated"; }
      });
      WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, getWindowControl())
      contentCtr = new NewUsersNotificationsController(ureq, bwControl);
      listenTo(contentCtr);
      return contentCtr.getInitialComponent();
    }
    else if (uobject.equals("noauthentication")) {
View Full Code Here

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

        Long oresK = new Long(Long.parseLong(courseNode.getIdent()));
        final OLATResourceable ores = OresHelper.createOLATResourceableInstance(oresC, oresK);
       
        //REVIEW:pb:this is responsible for building up the jumpable businesspath/REST URL kind of
        ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(ores);
        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl);
       
        if (previewMode) {
          ncr = new NodeRunConstructionResult(courseNode.createPreviewController(ureq, bwControl, userCourseEnv, nodeEval));
        } else {
          ncr = courseNode.createNodeRunConstructionResult(ureq, bwControl, userCourseEnv, nodeEval, nodecmd);
View Full Code Here

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

    guiMessage = new GUIMessage();
    guimsgPanel = new OncePanel("guimsgPanel");

    // define the new windowcontrol
    final WindowControl origWCo = ouisc_wControl;

    WindowControl myWControl = new WindowControl() {
      private WindowControlInfo wci;

      {
        wci = new WindowControlInfoImpl(BaseFullWebappController.this, origWCo.getWindowControlInfo());
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#pushToMainArea(org.olat.core.gui.components.Component)
       */
      @SuppressWarnings("synthetic-access")
      public void pushToMainArea(Component newMainArea) {
        currentGuiStack.pushContent(newMainArea);
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#pushAsModalDialog(java.lang.String,
       *      org.olat.core.gui.components.Component)
       */

      @SuppressWarnings("synthetic-access")
      public void pushAsModalDialog(Component newModalDialog) {
        currentGuiStack.pushModalDialog(newModalDialog);
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#pop()
       */
      @SuppressWarnings("synthetic-access")
      public void pop() {
        // reactivate latest dialog from stack, dumping current one
        currentGuiStack.popContent();
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#setInfo(java.lang.String)
       */
      @SuppressWarnings("synthetic-access")
      public void setInfo(String info) {
        guiMessage.setInfo(info);
        guimsgPanel.setContent(guimsgVc);

        // setInfo is called input guimsgPanel into the correct place
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#setError(java.lang.String)
       */
      @SuppressWarnings("synthetic-access")
      public void setError(String error) {
        guiMessage.setError(error);
        guimsgPanel.setContent(guimsgVc);
      }

      /**
       * @see org.olat.core.gui.control.WindowControl#setWarning(java.lang.String)
       */
      @SuppressWarnings("synthetic-access")
      public void setWarning(String warning) {
        guiMessage.setWarn(warning);
        guimsgPanel.setContent(guimsgVc);
      }

      public WindowControlInfo getWindowControlInfo() {
        return wci;
      }

      public void makeFlat() {
        throw new AssertException("should never be called!");
      }

      public BusinessControl getBusinessControl() {
        return origWCo.getBusinessControl();
      }

      public WindowBackOffice getWindowBackOffice() {
        return origWCo.getWindowBackOffice();
      }

    };
    overrideWindowControl(myWControl);


    /*
     * BaseFullWebappController provides access to Dynamic Tabs
     * on the same window and not on all Windows!
     * TODO:pb discuss with HJZ multi window concept.
     */
   
    // detach DTabs implementation from the controller - DTabs may be fetched from the window and locked on (synchronized access).
    // if this is controller the controller is locked instead of only the DTabs part.
    myDTabsImpl = new DTabs() {

      public void activate(UserRequest ureq, DTab dTab, String viewIdentifier) {
        BaseFullWebappController.this.activate(ureq, dTab, viewIdentifier);
      }

      public void activateStatic(UserRequest ureq, String className, String viewIdentifier) {
        BaseFullWebappController.this.activateStatic(ureq, className, viewIdentifier);
      }

      public void addDTab(DTab dt) {
        BaseFullWebappController.this.addDTab(dt);
      }

      public DTab createDTab(OLATResourceable ores, String title) {
        return BaseFullWebappController.this.createDTab(ores, title);
      }

      public DTab getDTab(OLATResourceable ores) {
        return BaseFullWebappController.this.getDTab(ores);
      }

      public void removeDTab(DTab dt) {
        BaseFullWebappController.this.removeDTab(dt);
      }
     
    };
   
   
   
    Window myWindow = myWControl.getWindowBackOffice().getWindow();
    myWindow.setAttribute("DTabs", myDTabsImpl);
    //REVIEW:PB remove if back support is desired
    myWindow.addListener(this);//to be able to report BACK / FORWARD / RELOAD
    /*
     * use getAttribute on i.e. Windows(ureq).getWindow(ureq) to retrieve this "service"
View Full Code Here

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

      boolean newFactory = false;
      if (launchController == null) {
        try {
          String resourceUrl = "[" + resName + ":0][notifications]";
          BusinessControl bc = BusinessControlFactory.getInstance().createFromString(resourceUrl);
          WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, windowControl);
          NewControllerFactory.getInstance().launch(ureq, bwControl);
          newFactory = true;
        } catch (Exception ex) {
          // fail silently
        }
View Full Code Here

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

      rm.incrementLaunchCounter(entry);
      OLATResource ores = entry.getOlatResource();
      ICourse course = loadCourse(ores);
     
      ContextEntry ce = BusinessControlFactory.getInstance().createContextEntry(entry);
      WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(ce, wControl)
     
      RunMainController launchC = new RunMainController(ureq, bwControl, course, null, false, false);
      return launchC;     
    }   
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.