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

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


   * @param forumCallback
   * @param title
   * @return a ChiefController
   */
  public static PopupBrowserWindow getPopupableForumController(UserRequest ureq, WindowControl wControl, final Forum forum, final ForumCallback forumCallback, final TitleInfo titleInfo) {   
    ControllerCreator ctrlCreator = new ControllerCreator() {
      public Controller createController(UserRequest lureq, WindowControl lwControl) {
        Controller forumWrapperController = getTitledForumController(lureq, lwControl, forum,  forumCallback, titleInfo);
        // use on column layout
        LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, forumWrapperController.getInitialComponent(), null);
        layoutCtr.addDisposableChildController(forumWrapperController); // dispose content on layout dispose
        return layoutCtr;
      }         
    };
    //wrap the content controller into a full header layout
    ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
    PopupBrowserWindow pbw = wControl.getWindowBackOffice().getWindowManager().createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
    return pbw;             
  }
View Full Code Here


        String actionid = te.getActionId();
        if (actionid.equals(CMD_LAUNCH)) {
          int rowid = te.getRowId();
          final EfficiencyStatement efficiencyStatement = efficiencyStatementsListModel.getEfficiencyStatementAt(rowid);
          // 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);
          //
        }
View Full Code Here

   */
  @Override
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == myContent) {
      if (event.getCommand().equals("showuserinfo")) {
        ControllerCreator ctrlCreator = new ControllerCreator() {
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return new UserInfoMainController(lureq, lwControl, portraitIdent);
          }         
        };
        //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);
        //
      }
View Full Code Here

        if (actionid.equals(CMD_LAUNCH)) {
          int rowid = te.getRowId();
          final NotePortletEntry pe = (NotePortletEntry) notesListModel.getObject(rowid);
          final Note note = pe.getValue();
          // will not be disposed on course run dispose, popus up as new browserwindow
          ControllerCreator ctrlCreator = new ControllerCreator() {
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              Controller nc = new NoteController(lureq, lwControl, note);
              // use on column layout
              LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, nc.getInitialComponent(), null);
              layoutCtr.addDisposableChildController(nc); // dispose content on layout dispose
              return layoutCtr;
            }         
          };
          //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);
          //
        }
View Full Code Here

   *      org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == showOtherUsers) {
        // show list of other online users that are connected to jabber server
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          return new ConnectedClientsListController(lureq, lwControl);
        }         
      };
      //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 (source == loginLink) {
View Full Code Here

   */
  @Override
  public void event(UserRequest ureq, Component source, Event event) {
    String command = event.getCommand();
      if (source == helpLink) {
        ControllerCreator ctrlCreator = new ControllerCreator() {
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return CourseFactory.createHelpCourseLaunchController(lureq, lwControl);
          }         
        };
        //wrap the content controller into a full header layout
        ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, ctrlCreator);
        //open in new browser window
        openInNewBrowserWindow(ureq, layoutCtrlr);
        //
      } else if (source == loginLink) {
        DispatcherAction.redirectToDefaultDispatcher(ureq.getHttpResp());
View Full Code Here

   *      org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == showOtherUsers) {
        // show list of other online users that are connected to jabber server
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          ConnectedClientsListController clientsListCtr = new ConnectedClientsListController(lureq, lwControl);
          LayoutMain3ColsController mainLayoutCtr = new LayoutMain3ColsController(lureq, lwControl, null, null, clientsListCtr.getInitialComponent(), null);
          mainLayoutCtr.addDisposableChildController(clientsListCtr);
          return mainLayoutCtr;
        }         
      };
      //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);
      //
    }
View Full Code Here

  public void event(UserRequest ureq, Component source, Event event) {
    if (source == loginLink) {
      AuthHelper.doLogout(ureq);
    }else if (source == helpLink) {
      ControllerCreator ctrlCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          return CourseFactory.createHelpCourseLaunchController(lureq, lwControl);
        }         
      };
      //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);
      //
    }
View Full Code Here

    contentP = new Panel("content");
    content_sourceVC = createVelocityContainer("content_source");
    mainVC.put("democontent", contentP);
    //
    String firstDemo = demolinknames.iterator().next();
    ControllerCreator cc = demos.get(firstDemo);
    demoController = cc.createController(ureq, getWindowControl());
    contentP.setContent(demoController.getInitialComponent());
   
    sourceP = new Panel("sourceP");
    VelocityContainer sourceVC = createVelocityContainer(firstDemo);
    ShrinkController sc = new ShrinkController(ureq, getWindowControl(), false, sourceVC, "toggle source");
View Full Code Here

    if (source instanceof Link) {
      Link sl = (Link) source;
      //userobject tells which demo to activate
      String uob = (String) sl.getUserObject();
      if (uob != null) {
        ControllerCreator cc = demos.get(uob);
        //update source
        VelocityContainer sourceVC = createVelocityContainer(uob);
        ShrinkController sc = new ShrinkController(ureq, getWindowControl(), false, sourceVC, "toggle source");
        sourceP.setContent(sc.getInitialComponent());
       
        //cleanup former democontroller
        if (demoController != null) demoController.dispose();
        contentP.popContent();
        //create new demo controller
        demoController = cc.createController(ureq, getWindowControl());
        contentP.pushContent(demoController.getInitialComponent());
      }
    }

  }
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.