Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.Controller


   * such as contentPackacking which requires only a fileroot (but this file directory depends on a ores in the end)
   *
   * create a wikiMaincontroller which disposes itself when the associated olatresourceable is disposed.
   */
  public Controller createWikiMainControllerDisposeOnOres(UserRequest ureq, WindowControl wControl, OLATResourceable ores, WikiSecurityCallback securityCallback, String initialPageName) {
    Controller controller = new WikiMainController(ureq, wControl, ores, securityCallback, initialPageName);
    OLATResourceableListeningWrapperController dwc = new OLATResourceableListeningWrapperController(ureq, wControl, ores, controller, ureq.getIdentity());
    return dwc;
  }
View Full Code Here


   * @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
View Full Code Here

  public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv,
      NodeEvaluation ne) {
    if (ne.isAtLeastOneAccessible()) {
      // Create a forum peekview controller that shows the latest two messages   
      Forum theForum = loadOrCreateForum(userCourseEnv);
      Controller peekViewController = new FOPeekviewController(ureq, wControl, theForum, ne.getCourseNode().getIdent(), 2);
      return peekViewController;     
    } else {
      // use standard peekview
      return super.createPeekViewRunController(ureq, wControl, userCourseEnv, ne);
    }
View Full Code Here

    // do the looping in the velocity context
    List<UserPropertyHandler> userPropertyHandlers = um.getUserPropertyHandlersFor(usageIdentifyer, false);
    myContent.contextPut("userPropertyHandlers", userPropertyHandlers);
    myContent.contextPut("homepageConfig", hpc);   
   
    Controller dpc = new DisplayPortraitController(ureq, getWindowControl(), identity, true, false);
    listenTo(dpc); // auto dispose
    myContent.put("image", dpc.getInitialComponent());
    putInitialPanel(myContent);
  }
View Full Code Here

    super(ureq, wControl);

    // if a user is not allowed to change his/her own password, say it here
    if (!UserModule.isPwdchangeallowed()) {
      String text = getTranslator().translate("notallowedtochangepwd", new String[] { WebappHelper.getMailConfig("mailSupport") });
      Controller simpleMsg = MessageUIFactory.createSimpleMessage(ureq, wControl, text);
      listenTo(simpleMsg);//register controller to be disposed automatically on dispose of Change password controller
      putInitialPanel(simpleMsg.getInitialComponent());
      return;
    }
   
   
View Full Code Here

      Roles roles = ureq.getUserSession().getRoles();
      boolean isAdministrativeUser = (roles.isAuthor() || roles.isGroupManager() || roles.isUserManager() || roles.isOLATAdmin())
      List<UserPropertyHandler> userPropertyHandlers = UserManager.getInstance().getUserPropertyHandlersFor(usageIdentifyer, isAdministrativeUser);
      userDataVC.contextPut("userPropertyHandlers", userPropertyHandlers);
     
      Controller identityAssessmentCtr = new IdentityAssessmentOverviewController(ureq, wControl, efficiencyStatement.getAssessmentNodes());
      listenTo(identityAssessmentCtr);//dispose it when this one is disposed
      userDataVC.put("assessmentOverviewTable", identityAssessmentCtr.getInitialComponent());
     
      content = userDataVC;
    } else {
      //message, that no data is available. This may happen in the case the "open efficiency" link is available, while in the meantime an author
      //disabled the efficiency statement.
      String text = translate("efficiencystatement.nodata");
      Controller messageCtr = MessageUIFactory.createErrorMessage(ureq, wControl, null, text);
      listenTo(messageCtr);//gets disposed as this controller gets disposed.
      content = messageCtr.getInitialComponent();
    }
    //Content goes to a 3 cols layout without left and right column
    LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), null, null, content, null);
    listenTo(layoutCtr);
    putInitialPanel(layoutCtr.getInitialComponent());
View Full Code Here

    CourseGroupManager cgm = course.getCourseEnvironment().getCourseGroupManager();
    boolean canEdit = ureq.getUserSession().getRoles().isOLATAdmin() || cgm.isIdentityCourseAdministrator(ureq.getIdentity());
    boolean canManage;
    if(canEdit) canManage = true;
    else canManage = cgm.isIdentityCourseCoach(ureq.getIdentity()) | cgm.hasRight(ureq.getIdentity(), CourseRights.RIGHT_GROUPMANAGEMENT);
    Controller controller = ChecklistUIFactory.getInstance().createDisplayController(ureq, wControl, loadOrCreateChecklist(userCourseEnv.getCourseEnvironment().getCoursePropertyManager()), null, canEdit, canManage, course);
    // Add title and descrition
    controller = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_cl_icon");
    return new NodeRunConstructionResult(controller);
  }
View Full Code Here

      WindowControl wControl) {
    RepositoryEntry repoEntry = RepositoryManager.getInstance().lookupRepositoryEntry(res, false);
    boolean isAdmin = ureq.getUserSession().getRoles().isOLATAdmin();
    boolean isOwner = RepositoryManager.getInstance().isOwnerOfRepositoryEntry(ureq.getIdentity(), repoEntry)
    FeedSecurityCallback callback = new FeedResourceSecurityCallback(isAdmin, isOwner);
    Controller blogCtr = BlogUIFactory.getInstance(ureq.getLocale()).createMainController(res, ureq, wControl, callback);
    LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(ureq, wControl, null, null, blogCtr.getInitialComponent(), null);
    layoutCtr.addDisposableChildController(blogCtr);
    return layoutCtr;
  }
View Full Code Here

   */
  @Override
  public NodeRunConstructionResult createNodeRunConstructionResult(UserRequest ureq, WindowControl wControl,
      UserCourseEnvironment userCourseEnv, NodeEvaluation ne, String nodecmd) {
    updateModuleConfigDefaults(false);
    Controller controller = new LLRunController(ureq, wControl, getModuleConfiguration(), this, userCourseEnv, true);
    controller = TitledWrapperHelper.getWrapper(ureq, wControl, controller, this, "o_ll_icon");
    return new NodeRunConstructionResult(controller);
  }
View Full Code Here

  @Override
  public Controller createPeekViewRunController(UserRequest ureq, WindowControl wControl, UserCourseEnvironment userCourseEnv,
      NodeEvaluation ne) {
    updateModuleConfigDefaults(false);
    // Use normal view as peekview
    Controller controller = new LLRunController(ureq, wControl, getModuleConfiguration(), this, userCourseEnv, false);
    return controller;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.Controller

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.