Examples of VelocityContainer


Examples of org.olat.core.gui.components.velocity.VelocityContainer

    this.mailTemplate = mailTemplate;
    orgMailSubject = mailTemplate.getSubjectTemplate();
    orgMailBody = mailTemplate.getBodyTemplate();
    cpFrom = mailTemplate.getCpfrom();
    this.trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    this.mainVC = new VelocityContainer("mainVC", VELOCITY_ROOT + "/mailnotification.html", trans, this);
    this.mailForm = new MailTemplateForm(ureq.getLocale(), mailTemplate, useCancel, this);
    this.mainVC.put("mailForm", mailForm);
    setInitialComponent(mainVC);
  }
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

    insertTree.setFormButtonKey("insertAtSelectedTreepos");
    insertTree.addListener(this);
    insertModel = new InsertTreeModel(course.getEditorTreeModel());
    insertTree.setTreeModel(insertModel);   
   
    VelocityContainer mainVC = createVelocityContainer("moveCopyNode");
   
    if(insertModel.totalNodeCount() > CourseModule.getCourseNodeLimit()){
      String msg = getTranslator().translate("warning.containsXXXormore.nodes",
          new String[]{String.valueOf(insertModel.totalNodeCount()),String.valueOf(CourseModule.getCourseNodeLimit()+1)});
      Controller tmp = MessageUIFactory.createWarnMessage(ureq, wControl, null, msg);
      listenTo(tmp);
      mainVC.put("nodelimitexceededwarning", tmp.getInitialComponent());
    }
   
    mainVC.put("selection", insertTree);
   
    this.putInitialPanel(mainVC);
  }
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

  }

  private void init(UserRequest ureq) {

    translator = new PackageTranslator(PACKAGE, ureq.getLocale());
    startPage = new VelocityContainer("olatmodcprun", VELOCITY_ROOT + "/run.html", translator, this);

    // show browse mode option only if not assessable, hide it if in "real test mode"
    isAssessable = config.getBooleanSafe(ScormEditController.CONFIG_ISASSESSABLE);

    chooseScormRunMode = new ChooseScormRunModeForm("chooseScormRunMode", translator, !isAssessable);
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

    testCachePut = LinkFactory.createButtonSmall("testCachePut", cachetest, this);
    testCachePut2= LinkFactory.createButtonSmall("testCachePut2", cachetest, this);
    mainVc.put("cachetest", cachetest);
    updateCacheInfo();
   
    final VelocityContainer busMsgs = createVelocityContainer("busmsgs");
    busMsgs.contextPut("time", Formatter.formatDatetime(new Date()));
   
    mainVc.put("busmsgs", busMsgs);
    // let a thread repeatively dump all messages
    //final Formatter f = Formatter.getInstance(ureq.getLocale());
    final WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
    Thread pollThread = new Thread(new Runnable(){
      public void run() {
        while (!disposed) {
          try {
            Thread.sleep(1000);
          } catch (InterruptedException e) {
            // ignore
          }
          wbo.invokeLater(new Runnable() {
            public void run() {
              // simple reput the new lists into the velocity container.
              // the container is then dirty and automatically rerendered since polling has been turned on here.
              busMsgs.contextPut("time", Formatter.formatDatetime(new Date()));
              busMsgs.contextPut("recmsgs", clusBus.getListOfReceivedMsgs());
              busMsgs.contextPut("sentmsgs", clusBus.getListOfSentMsgs());
              // also let node infos refresh
              updateNodeInfos();
              // also let perf infos refresh
              updatePerfInfos();
              // update cache info
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

   * @param wControl
   */
  protected InfoMsgPortletRunController(UserRequest ureq, WindowControl wControl) {
    super(wControl);
    this.trans = new PackageTranslator(Util.getPackageName(InfoMsgPortletRunController.class), ureq.getLocale());
    this.infoVC = new VelocityContainer("infoVC", VELOCITY_ROOT + "/portlet.html", trans, this);
    InfoMessageManager mrg = (InfoMessageManager)CoreSpringFactory.getBean(InfoMessageManager.class);
    String infoMsg = mrg.getInfoMessage();
    if (StringHelper.containsNonWhitespace(infoMsg)) {
      infoVC.contextPut("content", infoMsg);
    } else {
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

  public HomePageDisplayController(UserRequest ureq, WindowControl wControl, HomePageConfig hpc) {
    super(ureq, wControl);

    // use property handler translator for translating of user fields
    setTranslator(UserManager.getInstance().getPropertyHandlerTranslator(getTranslator()));
    VelocityContainer myContent = createVelocityContainer("homepagedisplay");
   
    String userName = hpc.getUserName();
    UserManager um = UserManager.getInstance();
    Identity identity = ManagerFactory.getManager().findIdentityByName(userName);
    User u = identity.getUser();
   
    myContent.contextPut("userName", identity.getName());
    myContent.contextPut("deleted", identity.getStatus().equals(Identity.STATUS_DELETED));
    myContent.contextPut("user", u);
    myContent.contextPut("locale", getLocale());
   
    // add configured property handlers and the homepage config
    // 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

Examples of org.olat.core.gui.components.velocity.VelocityContainer

    this.changeableIdentity = changeableIdentity;

    this.translator = new PackageTranslator(PACKAGE, ureq.getLocale());

    myContent = new VelocityContainer("settings", VELOCITY_ROOT + "/prefs.html", translator, this);

    prefsCtr = new PreferencesFormController(ureq, wControl, changeableIdentity);
    prefsCtr.addControllerListener(this);
    myContent.put("prefs", prefsCtr.getInitialComponent());
   
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

   
    // build menu (treemodel)
    NodeClickedRef nclr = navHandler.evaluateJumpToCourseNode(ureq, getWindowControl(), null, null, null);
    if (!nclr.isVisible()) {
      getWindowControl().setWarning(translate("rootnode.invisible"));
      VelocityContainer noaccess = createVelocityContainer("noaccess");   
      configButton = LinkFactory.createButton("command.config", noaccess, this);
      previewLayoutCtr.setCol3(noaccess);
      return;
    }
     
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

  public DisclaimerController(UserRequest ureq, WindowControl wControl, boolean readOnly) {
    super(ureq, wControl);
    translator = Util.createPackageTranslator(DisclaimerController.class, ureq.getLocale());
    this.disclaimerFormController = new DisclaimerFormController(ureq, wControl, readOnly);
    listenTo(this.disclaimerFormController);
    main = new VelocityContainer("main", VELOCITY_ROOT + "/disclaimer.html", translator, this);
    main.put("dclform", this.disclaimerFormController.getInitialComponent());
   
    // add optinal download link, see class comments in DisclaimerFormController
    // Add the additional link to the form (depending on the configuration)
    if (RegistrationModule.isDisclaimerAdditionaLinkText()) {
View Full Code Here

Examples of org.olat.core.gui.components.velocity.VelocityContainer

          subscriptionPanel.setContent(subscriptionCtr.getInitialComponent());
        }
        // Lazy initialize the notification subscription controller when the
        // user clicks the tab the first time
        else if (tabbedEvent.getNewComponent() == rssPanel && rssPanel.getContent() == null) {
          VelocityContainer notificationsRssVC = createVelocityContainer("notificationsRSS");
          String rssLink = RSSUtil.getPersonalRssLink(ureq);
          notificationsRssVC.contextPut("rssLink", rssLink);
          User user = subscriberIdentity.getUser();
          String fullName = user.getProperty(UserConstants.FIRSTNAME, getLocale()) + " " + user.getProperty(UserConstants.LASTNAME, getLocale());
          notificationsRssVC.contextPut("fullName", fullName);
          rssPanel.setContent(notificationsRssVC);
        }
      }
    }
  }
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.