Examples of DTabs


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

      openInNewBrowserWindow(ureq, popupLayoutCtr);
      //
    } else if (cmd.equals(TOOLBOX_LINK_COURSECONFIG)) {
      //FIXME:pb:a better workflows to link a course detail page from course run
      //was brasato getWindowControl().getDTabs().activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      if(dts != null){
        dts.activateStatic(ureq, RepositorySite.class.getName(),RepositoryMainController.JUMPFROMEXTERN + RepositoryMainController.JUMPFROMCOURSE + courseRepositoryEntry.getKey().toString());
      }else{
        //help course in popup window can not display detail page
        getWindowControl().setInfo("detail can not be displayed here");
      }
      return;
View Full Code Here

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

      Object userObject = userLink.getUserObject();
      if (userObject instanceof Identity) {
        Identity chosenIdentity = (Identity) userObject;
        HomePageConfigManager hpcm = HomePageConfigManagerImpl.getInstance();
        OLATResourceable ores = hpcm.loadConfigFor(chosenIdentity.getName());
        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, chosenIdentity.getName());
          if (dt == null) return;
          UserInfoMainController uimc = new UserInfoMainController(ureq, dt.getWindowControl(), chosenIdentity);
          dt.setController(uimc);
          dts.addDTab(dt);
        }
        dts.activate(ureq, dt, null);
      }
    }

  }
View Full Code Here

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

          } else if (!rm.isAllowedToLaunch(ureq, re)) {
            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

          }
        } else if (actionid.equals(CMD_DELETE)) {         
          // show confirmation dialog
          confirmDeleteCtr = activateYesNoDialog(ureq, null, translate("efficiencyStatements.delete.confirm", efficiencyStatement.getCourseTitle()), confirmDeleteCtr);
View Full Code Here

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

    String displayName = businessGroup.getName();

    BusinessGroupMainRunController bgMrc = null;

    OLATResourceable ores = businessGroup;
    DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
    //was brasato:: DTabs dts = wControl.getDTabs();
    DTab dt = dts.getDTab(ores);
    if (dt == null) {
      // does not yet exist -> create and add
      dt = dts.createDTab(ores, displayName);
      // tabs full
      if (dt == null) return null;
      bgMrc = this.createRunControllerFor(ureq, dt.getWindowControl(), businessGroup, isGMAdmin, initialViewIdentifier);
      dt.setController(bgMrc);
      dts.addDTab(dt);
    }
    dts.activate(ureq, dt, null); // null: do not activate to a certain view
    return bgMrc;
  }
View Full Code Here

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

   *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == showAllLink){
      // activate learning resource tab in top navigation and active my courses menu item
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      //attach controller / action extension dynamically to lr-site
      if (studentView) {
        dts.activateStatic(ureq, RepositorySite.class.getName(), "search.mycourses.student");
      } else {
        dts.activateStatic(ureq, RepositorySite.class.getName(), "search.mycourses.teacher");
      }     
    }
  }
View Full Code Here

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

          int rowId = te.getRowId();
          RepositoryEntry repoEntry = repoEntryListModel.getRepositoryEntry(rowId);
          // 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.DTabs

   *      org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == showAllLink) {
      // activate group tab in top navigation
      DTabs dts = (DTabs)Windows.getWindows(ureq).getWindow(ureq).getAttribute("DTabs");
      //was brasato:: getWindowControl().getDTabs().activateStatic(ureq, GroupsSite.class.getName(), null);
      dts.activateStatic(ureq, GroupsSite.class.getName(), null);
    }
  }
View Full Code Here

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

          if (ores == null) throw new AssertException("repoEntry had no olatresource, repoKey = " + currentRepoEntry.getKey());
         
          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.DTabs

        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);
            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
                                                                  // controller
          }
        }
        // render the window
        Window w = cc.getWindow();
View Full Code Here

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

    RepositoryManager.getInstance().incrementLaunchCounter(repositoryEntry);
    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
     * DONE_EVENT will be catched by RepositoryMainController
     */
    fireEvent(ureq, Event.DONE_EVENT);
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.