Examples of DTab


Examples of org.olat.core.gui.control.generic.dtabs.DTab

          // refresh repo entry, attach to hibernate session
          repoEntry = (RepositoryEntry) DBFactory.getInstance().loadObject(repoEntry);
          // get run controller fro this repo entry and launch it in new tab
          DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
          //was brasato:: DTabs dts = wControl.getDTabs();
          DTab dt = dts.getDTab(repoEntry.getOlatResource());
          if (dt == null) {
            // does not yet exist -> create and add
            dt = dts.createDTab(repoEntry.getOlatResource(), repoEntry.getDisplayname());
            // tabs full
            if (dt != null) {
              Controller runCtr = RepositoyUIFactory.createLaunchController(repoEntry, null, ureq, getWindowControl());         
              dt.setController(runCtr);
              dts.addDTab(dt);
              dts.activate(ureq, dt, null); // null: do not activate to a certain view
            }
          }
        }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

          addLoggingResourceable(LoggingResourceable.wrap(ores, OlatResourceableType.genRepoEntry));
          String title = currentRepoEntry.getDisplayname();
         
          DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
          //was brasato:: DTabs dts = getWindowControl().getDTabs();
          DTab dt = dts.getDTab(ores);
          if (dt == null) {
            // does not yet exist -> create and add
            dt = dts.createDTab(ores, title);
            if (dt == null) return;
            Controller ctrl = ControllerFactory.createLaunchController(ores, null, ureq, dt.getWindowControl(), true);
            dt.setController(ctrl);
            dts.addDTab(dt);
          }
          dts.activate(ureq, dt, null); // null: do not activate to a certain
                                        // view
        }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

        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);
            if (dt == null) { // tabs are full
            //create dtabs already issues a warning message 
            } else {
              JumpInResult jres = jh.createJumpInResult(ureq, dt.getWindowControl());
              Controller resC = jres.getController();
              if (resC == null) { // the resource was not found or user is not
                                  // allowed to start the resource
                DispatcherAction.sendNotFound(request.getRequestURI(), response);
                return;
              }
              dt.setController(resC);
              dts.addDTab(dt);
              dts.activate(ureq, dt, null); // null: do not activate controller
            }
          } else {
            dts.activate(ureq, dt, jh.extractActiveViewId(ureq)); // activate
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

    OLATResourceable ores = repositoryEntry.getOlatResource();
    String displayName = getDisplayName(ureq.getLocale());

    //was brasato:: DTabs dts = getWindowControl().getDTabs();
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
      dt = dts.createDTab(ores, displayName);
      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;
      dt.setController(ctrl);
      dts.addDTab(dt);
    }
    dts.activate(ureq, dt, RepositoryDetailsController.ACTIVATE_RUN)
    /**
     * close detail page after resource is closed
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

    OLATResourceable ores = repositoryEntry.getOlatResource();
   
    //was brasato:: DTabs dts = getWindowControl().getDTabs();
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
      dt = dts.createDTab(ores, repositoryEntry.getDisplayname());
      if (dt == null){
        //null means DTabs are full -> warning is shown
        return;
      }
      //user activity logger is set by course factory
      Controller editorController = typeToEdit.getEditorController(ores, ureq, dt.getWindowControl());
      if(editorController == null){
        //editor could not be created -> warning is shown
        return;
      }
      dt.setController(editorController);
      dts.addDTab(dt);
    }
    dts.activate(ureq, dt, RepositoryDetailsController.ACTIVATE_EDITOR);
  }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

    } else {
      // get the OLAT resource from this repo entry
      OLATResourceable ores = re.getOlatResource();
      //was brasato:: DTabs dts = getWindowControl().getDTabs();
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      DTab dt = dts.getDTab(ores);
      if (dt == null) {
        // does not yet exist -> create and add
        dt = dts.createDTab(ores, bookmark.getTitle());
        if (dt == null) {
          //ups? what happend here?
          log.warn("Could not create dTab for bookmark with title::" + bookmark.getTitle() + " and ores::" + ores);
          return true;
        }
        Controller launchController = ControllerFactory.createLaunchController(ores, null, ureq, dt.getWindowControl(), true);
        dt.setController(launchController);
        dts.addDTab(dt);
      }
      // null: do not activate to a certain view
      dts.activate(ureq, dt, null);
    }                       
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

            showWarning("efficiencyStatements.course.noaccess");
          } else {
            OLATResourceable ores = re.getOlatResource();
            //was brasato:: DTabs dts = getWindowControl().getDTabs();
            DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
            DTab dt = dts.getDTab(ores);
            if (dt == null) {
              // does not yet exist -> create and add
              dt = dts.createDTab(ores, efficiencyStatement.getCourseTitle());
              if (dt == null) return;
              Controller launchController = ControllerFactory.createLaunchController(ores, null, ureq, dt.getWindowControl(), true);
              dt.setController(launchController);
              dts.addDTab(dt);
            }
            dts.activate(ureq, dt, null)// null: do not activate to a certain view

          }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

      throw new AssertException("Trying to edit repository entry which has no assoiciated editor: "+ typeToEdit);
    }         
    // Open editor in new tab
    OLATResourceable ores = repositoryEntry.getOlatResource();
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
      dt = dts.createDTab(ores, repositoryEntry.getDisplayname());
      if (dt == null){
        //null means DTabs are full -> warning is shown
        return;
      }
      //user activity logger is set by course factory
      Controller editorController = typeToEdit.getEditorController(ores, ureq, dt.getWindowControl());
      if(editorController == null){
        //editor could not be created -> warning is shown
        return;
      }
      dt.setController(editorController);
      dts.addDTab(dt);
    }
    dts.activate(ureq, dt, RepositoryDetailsController.ACTIVATE_EDITOR);
  }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

          if (!rm.isAllowedToLaunch(ureq, re)) {
            getWindowControl().setWarning(translate("warn.cantlaunch"));
          } else {
            OLATResourceable ores = re.getOlatResource();
            DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
            DTab dt = dts.getDTab(ores);
            if (dt == null) {
              // does not yet exist -> create and add
              dt = dts.createDTab(ores, re.getDisplayname());
              if (dt == null) return;
              Controller launchController = ControllerFactory.createLaunchController(ores, null, ureq, dt.getWindowControl(), true);
              dt.setController(launchController);
              dts.addDTab(dt);
            }
            dts.activate(ureq, dt, null); // null: do not activate a certain
                                          // view
          }
View Full Code Here

Examples of org.olat.core.gui.control.generic.dtabs.DTab

      }
      RepositoryHandler typeToEdit = RepositoryHandlerFactory.getInstance().getRepositoryHandler(repositoryEntry);
      // Open editor in new tab
      OLATResourceable ores = repositoryEntry.getOlatResource();
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      DTab dt = dts.getDTab(ores);
      if (dt == null) {
        // does not yet exist -> create and add
        dt = dts.createDTab(ores, repositoryEntry.getDisplayname());
        if (dt == null){
          //null means DTabs are full -> warning is shown
          return;
        }
        //user activity logger is set by course factory
        Controller editorController = typeToEdit.getLaunchController(ores, null, ureq, dt.getWindowControl());
        if(editorController == null){
          //editor could not be created -> warning is shown
          return;
        }
        dt.setController(editorController);
        dts.addDTab(dt);
      }
      dts.activate(ureq, dt, RepositoryDetailsController.ACTIVATE_EDITOR);
    }
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.