Examples of VelocityContainer


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

   *            the velocity page to use in the _content folder, e.g. "index",
   *            or "edit". The suffix ".html" gets automatically added to the
   *            page name e.g. "index.html".
   */
  protected VelocityContainer createVelocityContainer(String page) {
    return new VelocityContainer("vc_" + page, velocity_root + "/" + page
        + ".html", translator, this);
  }
View Full Code Here

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

  public ShrinkController(UserRequest ureq, WindowControl wControl, boolean initiallyExpanded, Component shrinkcontent, String title) {
    super(null);
    this.shrinkcontent = shrinkcontent;
    isLarge = initiallyExpanded;
    shrinkcontent.setVisible(initiallyExpanded);
    myContent = new VelocityContainer("shrinkwrapper", VELOCITY_ROOT + "/index.html", null,  this);
    myContent.contextPut("title", title);
   
    myContent.put("shrinkcontent", shrinkcontent);
    setInitialComponent(myContent);
  }
View Full Code Here

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

    this.table.setMultiSelect(tableConfig.isMultiSelect());
    this.table.enableShowAllLink(tableConfig.isShowAllLinkEnabled());


    // table is embedded in a velocity page that renders the surrounding layout
    contentVc = new VelocityContainer("tablevc", VELOCITY_ROOT + "/tablelayout.html", trans, this);
    contentVc.put("table", table);

    // fetch prefs (which were loaded at login time
    String preferencesKey = tableConfig.getPreferencesKey();
    if (tableConfig.isPreferencesOffered() && preferencesKey != null) {
View Full Code Here

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

    this.portletsConfigurations = portletsConfigurations;   
    this.portletContainers = new HashMap<String, PortletContainer>();
    this.inactivePortlets = new ArrayList<String>();

    this.trans = new PackageTranslator(Util.getPackageName(PortalImpl.class), ureq.getLocale());
    this.portalVC = new VelocityContainer("portalVC", VELOCITY_ROOT + "/portal.html", trans, this);    // initialize arrays

    // calculate the column css classes based on YAML schema
    int cols = portalColumns.size();
    List<String> columnCssClassWrapper = new ArrayList(cols);
    columnCssClassWrapper.add(0, ""); // empty, in velocity things start with 1...
View Full Code Here

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

  ToolControllerImpl(WindowControl wControl) {
    super(wControl);
    entries = new ArrayList();
    myLinks = new ArrayList();
    // init content; we do not need a translator here (null argument below)
    content = new VelocityContainer("toolcontent", VELOCITY_ROOT + "/index.html", null, this);
    content.contextPut("entries", entries);
    setDragEnabled(false);
    setInitialComponent(content);
  }
View Full Code Here

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

        } else {
          // no ide configured... todo info msg
        }
      } else  if (com.equals("vc")) {
        // ------- open velocity container for editing -------
        VelocityContainer vc = (VelocityContainer) infoComponent;
        String velocityTemplatePath  = WebappHelper.getSourcePath()+"/"+vc.getPage();
        VFSLeaf vcContentFile = new LocalFileImpl(new File(velocityTemplatePath));
        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

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

              String.valueOf(source.getDispatchID()+"&nbsp; level:"+lev));

          // offer velocity editor if appropriate.
          // todo: let component provide component-specific editors
          if (source instanceof VelocityContainer) {
            VelocityContainer vcc = (VelocityContainer) source;
            sb.append("<br />velocity: <a href=\"");
            debugURLBuilder.buildURI(sb, new String[] { "cid", "com" }, new String[] { String.valueOf(did), "vc" });
            sb.append("\">").append("page:").append(vcc.getPage()+"</a>");           
          }
         
          Controller listC = Util.getListeningControllerFor(source);
          if (listC != null) {
            sb.append("<br /><b>controller:</b> <a  target=\"_blank\" href=\"");
View Full Code Here

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

    // below as the cause it somehow gets lost. If this does not turn out to be true then the line below can be removed.
    // in any case, it is just a log.warn
    Tracing.logWarn("ExceptionWindowController<init>: Throwable occurred, logging the full stacktrace:", th, getClass());
    Translator trans = new PackageTranslator(PACKAGE, ureq.getLocale());
    Formatter formatter = Formatter.getInstance(ureq.getLocale());
    msg = new VelocityContainer("olatmain", VELOCITY_ROOT + "/exception_page.html", trans, this);
    // disallow wrapping of divs around the panel and the main velocity page
    // (since it contains the "<html><head... intro of the html page,
    // and thus has better to be replaced as a whole (new page load) instead of
    // a dom replacement)
    msg.setDomReplaceable(false);
View Full Code Here

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

   * @param trans the translator to translate the given key
   * @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

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

   */
  CopyToClipboardController(UserRequest ureq, WindowControl wControl, ClipboardServiceImpl cbs, ClipboardEntryCreator cbCreator) {
    super(ureq, wControl);
    this.cbs = cbs;
    this.cbCreator = cbCreator;
    VelocityContainer mainVc = createVelocityContainer("to");
   
    copyTo = LinkFactory.createButton("copyTo", mainVc, this);
    putInitialPanel(mainVc);
  }
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.