Package org.olat.core.gui.components.velocity

Examples of org.olat.core.gui.components.velocity.VelocityContainer.contextPut()


        boolean readOnly = Settings.isReadOnlyDebug();
        vcEditorController = new PlainTextEditorController(ureq, getWindowControl(), vcContentFile, "utf-8", true, true, null);
        vcEditorController.setReadOnly(readOnly);
        vcEditorController.addControllerListener(this);
        VelocityContainer vcWrap = createVelocityContainer("vcWrapper");
        if (readOnly) vcWrap.contextPut("readOnly", Boolean.TRUE);
        vcWrap.put("editor", vcEditorController.getInitialComponent());
        getWindowControl().pushAsModalDialog(DebugHelper.createDebugProtectedWrapper(vcWrap));
      }
    }
  }
View Full Code Here


   * @param content the component which is to appear after the title
   * @return a component which first renders the title with h1 tags, and then the content
   */
  public static Component createTitledComponent(String titleKey, String[] args, Translator trans, Component content) {
    VelocityContainer vc = new VelocityContainer("titlewrapper", VELOCITY_ROOT + "/title.html", trans, null);
    vc.contextPut("title", trans.translate(titleKey, args));
    vc.put("content", content);
    return vc;
  }

}
View Full Code Here

      logWarn("Context help page does not exist on path::" + pagePath, null);
      return null;
    }
    VelocityContainer container =  new VelocityContainer("contextHelpPageVC", pagePath, pageTranslator, this);         
    // add media directory url to context for resource delivery
    container.contextPut("chelpStaticDirUrl", chelpStaticDirUrl);
    return container;
  }

  /**
   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
View Full Code Here

    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();
View Full Code Here

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

          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();
View Full Code Here

            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

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

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

    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);
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.