Package org.olat.core.gui.control.creator

Examples of org.olat.core.gui.control.creator.ControllerCreator


      doLaunch(ureq);
    }
  }

  private void doLaunch(UserRequest ureq) {
    dockC = new DockController(ureq, getWindowControl(), false, new ControllerCreator(){
      public Controller createController(UserRequest lureq, WindowControl lwControl) {
        Controller foCtr = ForumUIFactory.getStandardForumController(lureq, lwControl, forum, foCallback);
        Controller titledCtrl = TitledWrapperHelper.getWrapper(lureq, lwControl, foCtr, courseNode, "o_fo_icon");
        foCtr.addControllerListener(FOCourseNodeRunController.this);
        return titledCtrl;
      }},
      new DockLayoutControllerCreatorCallback() {
        public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
          return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
            @SuppressWarnings("synthetic-access")
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              // Wrap in column layout, popup window needs a layout controller
              Controller ctr = contentControllerCreator.createController(lureq, lwControl);
              LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, ctr.getInitialComponent(),
View Full Code Here


    // Show popup window with file browser to select file
    // Only one popup file chooser allowed at any time. ccc contains icc,
    // icc gets disposed by ccc
   
    //helper code which is used to create link chooser controller
    ControllerCreator linkChooserControllerCreator = new ControllerCreator() {
      public Controller createController(UserRequest lureq,WindowControl lwControl) {
        LinkChooserController myLinkChooserController;
        VFSContainer baseContainer = config.getLinkBrowserBaseContainer();
        String uploadRelPath = config.getLinkBrowserUploadRelPath();
        CustomLinkTreeModel linkBrowserCustomTreeModel = config.getLinkBrowserCustomLinkTreeModel();
View Full Code Here

  private static ChiefController createGuestHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated()) throw new AssertException("not authenticated!");

    BaseChiefControllerCreator bbc = new BaseChiefControllerCreator();
    bbc.setContentControllerCreator(/*this is later injected by spring*/new ControllerCreator() {
      public Controller createController(UserRequest lureq, WindowControl lwControl) {
        BaseFullWebappControllerParts guestSitesAndNav = new GuestBFWCParts();
        return new BaseFullWebappController(lureq, lwControl, guestSitesAndNav );
      }
    });
View Full Code Here

   */
  private static ChiefController createAuthHome(UserRequest ureq) {
    if (!ureq.getUserSession().isAuthenticated()) throw new AssertException("not authenticated!");

    BaseChiefControllerCreator bbc = new BaseChiefControllerCreator();
    bbc.setContentControllerCreator(/*this is later injected by spring*/new ControllerCreator() {
      public Controller createController(UserRequest lureq, WindowControl lwControl) {
        BaseFullWebappControllerParts authSitesAndNav = new AuthBFWCParts();
        return new BaseFullWebappController(lureq, lwControl, authSitesAndNav );
      }
    });
View Full Code Here

        String actionid = te.getActionId();
        int rowid = te.getRowId();
        efficiencyStatement = efficiencyStatementsListModel.getEfficiencyStatementAt(rowid);
        if (actionid.equals(CMD_SHOW)) {         
          // will not be disposed on course run dispose, popus up as new browserwindow
          ControllerCreator ctrlCreator = new ControllerCreator() {
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              return new EfficiencyStatementController(lwControl, lureq, efficiencyStatement.getCourseRepoEntryKey());
            }         
          };
          //wrap the content controller into a full header layout
          ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
          //open in new browser window
          PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
          pbw.open(ureq);
          //
        } else if (actionid.equals(CMD_LAUNCH_COURSE)) {
View Full Code Here

      return;
    } else if (event.getCommand().equals(CMD_OPEN_PROJECT_LEADER_DETAIL)){
      if (source instanceof Link) {
        Link projectLeaderLink = (Link)source;
        final Identity identity = (Identity)projectLeaderLink.getUserObject();
        ControllerCreator ctrlCreator = new ControllerCreator() {
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new UserInfoMainController(lureq, lwControl, identity);
          }
        };
        // wrap the content controller into a full header layout
        ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
        // open in new browser window
        this.openInNewBrowserWindow(ureq, layoutCtrlr);
      }
    } else if (source == attachedFileLink) {
      doFileDelivery( project, courseEnv, courseNode);
View Full Code Here

    }
    Controller wrappedCtr = TitledWrapperHelper.getWrapper(ureq, wControl, wikiCtr, wikiCourseNode, Wiki.CSS_CLASS_WIKI_ICON);
   
    CloneLayoutControllerCreatorCallback clccc = new CloneLayoutControllerCreatorCallback() {
      public ControllerCreator createLayoutControllerCreator(UserRequest ureq, final ControllerCreator contentControllerCreator) {
        return BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, new ControllerCreator() {
          @SuppressWarnings("synthetic-access")
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            // wrapp in column layout, popup window needs a layout controller
            Controller ctr = contentControllerCreator.createController(lureq, lwControl);
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, ctr.getInitialComponent(),
View Full Code Here

  private void activateUserController(final Project projectAt, UserRequest urequest) {
    if (projectAt.getProjectLeaders().isEmpty()) {
      this.showInfo("show.info.no.project.leader");
    } else if (projectAt.getProjectLeaders().size() > 0) {
      // Open visiting card in new popup
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          return new UserInfoMainController(lureq, lwControl, projectAt.getProjectLeaders().get(0));
        }
      };
      // wrap the content controller into a full header layout
      ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(urequest, ctrlCreator);
      this.openInNewBrowserWindow(urequest, layoutCtrlr);
    }
  }
View Full Code Here

  public StatisticActionExtension(){
    //
  }
 
  public Controller createController(UserRequest lureq, WindowControl lwControl, ICourse course){
    ControllerCreator cc = getActionController();
    if(cc instanceof StatisticAutoCreator){
      StatisticAutoCreator sac = (StatisticAutoCreator)cc;
      return sac.createController(lureq, lwControl, course);
    }else{
      return cc.createController(lureq, lwControl);
    }
  }
View Full Code Here

      RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntryBySoftkey(cc.getGlossarySoftKey(), false);
      DTab dt = dts.getDTab(repoEntry.getOlatResource());
      if (dt != null) {
        dts.activate(ureq, dt, ((Boolean)allowGlossaryEditing).toString());
      } else {
        ControllerCreator ctrlCreator = new ControllerCreator() {
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            GlossaryMainController glossaryController = CourseGlossaryFactory.createCourseGlossaryMainRunController(lwControl, lureq, cc,
                allowGlossaryEditing);
            if (glossaryController == null) {
              // happens in the unlikely event of a user who is in a course and
              // now
              // tries to access the glossary
              String text = translate("error.noglossary");
              return MessageUIFactory.createInfoMessage(lureq, lwControl, null, text);
            } else {
              // use a one-column main layout
              LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, glossaryController
                  .getInitialComponent(), null);
            // dispose glossary on layout dispose
              layoutCtr.addDisposableChildController(glossaryController);
              return layoutCtr;
            }
          }
        };
 
        ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
        // open in new browser window
        openInNewBrowserWindow(ureq, layoutCtrlr);
        return;// immediate return after opening new browser window!
      }
    }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.creator.ControllerCreator

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.