Package org.olat.core.gui.control

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


        @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

        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

    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

      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

      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

        // tabs are full: TODO
        // user error message is generated in BaseFullWebappController, nothing
        // to do here
      } else {

        WindowControl bwControl = BusinessControlFactory.getInstance().createBusinessWindowControl(bc, dt.getWindowControl());
        Controller launchC = typeHandler.createController(mainCe, ureq, bwControl);

        dt.setController(launchC);
        dts.addDTab(dt);
      }
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.