Examples of VelocityContainer


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

   * @param showAsOverlay
   */
  public CloseableModalController(WindowControl wControl, String closeButtonText, Component modalContent, boolean displayAsOverlay, String title) {
    super(wControl);
    final Panel guiMsgPlace = new Panel("guimessage_place");
    myContent = new VelocityContainer("closeablewrapper", VELOCITY_ROOT + "/index.html", null, this) {
      public void validate(UserRequest ureq, ValidationResult vr) {
        super.validate(ureq, vr);
        // just before rendering, we need to tell the windowbackoffice that we are a favorite for accepting gui-messages.
        // the windowbackoffice doesn't know about guimessages, it is only a container that keeps them for one render cycle
        WindowBackOffice wbo = getWindowControl().getWindowBackOffice();
View Full Code Here

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

  public CloseableModalWindowController(UserRequest ureq, WindowControl wControl, String title, Component modalContent, String id) {
    super(ureq, wControl);
    modalId = id;

    final Panel guiMsgPlace = new Panel("guimessage_place");
    mainVC = new VelocityContainer("closeablewrapper", Util.getPackageVelocityRoot(this.getClass()) + "/modalwindow.html", null, this) {
      public void validate(UserRequest ureq, ValidationResult vr) {
        super.validate(ureq, vr);
        // just before rendering, we need to tell the windowbackoffice
        // that we are a favorite for accepting gui-messages.
        // the windowbackoffice doesn't know about guimessages, it is
View Full Code Here

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

    super(null);
    // TODO:fj:b Layoutmanagers which make sense for the web
    if (layouter != null && layouter != Layouts.VERTICAL) throw new AssertException("not implemented yet!");
    this.controllers = controllers;

    myContent = new VelocityContainer("layouter", VELOCITY_ROOT + "/vertical.html", null, null);

    int cnt = controllers.size();
    String[] names = new String[cnt];
    for (int i = 0; i < cnt; i++) {
      String cName = "c" + i; // c0 c1 c2
View Full Code Here

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

   *          been answered by the user (convenience)
   */
  public DialogController(Locale locale, String firstButtonText, String secondButtonText, String text, Object userObject, boolean displayCloseIcon, String title) {
    super(null);
    this.userObject = userObject;
    myContent = new VelocityContainer("genericdialog", VELOCITY_ROOT + "/index.html", new PackageTranslator(PACKAGE, locale), this);
   
    firstButton = LinkFactory.createCustomLink("firstButton", "fb", firstButtonText, Link.BUTTON + Link.NONTRANSLATED, myContent, this);
    secondButton = LinkFactory.createCustomLink("secondButton", "sb", secondButtonText, Link.BUTTON + Link.NONTRANSLATED, myContent, this);
    if (displayCloseIcon){
      backIcon = LinkFactory.createIconClose("close", myContent, this);
View Full Code Here

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

   * @param content the component to push as modal dialog
   */
  public void pushModalDialog(Component content) {
    // wrap the component into a modal foreground dialog with alpha-blended-background
    final Panel guiMsgPlace = new Panel("guimsgplace_for_modaldialog");
    VelocityContainer inset = new VelocityContainer("inset", VELOCITY_ROOT + "/modalDialog.html", null, null) {
      public void validate(UserRequest ureq, ValidationResult vr) {
        super.validate(ureq, vr);
        // just before rendering, we need to tell the windowbackoffice that we are a favorite for accepting gui-messages.
        // the windowbackoffice doesn't know about guimessages, it is only a container that keeps them for one render cycle
        List zindexed = (List) wbo.getData("guimessage");
        if (zindexed == null) {
          zindexed = new ArrayList(3);
          wbo.putData("guimessage", zindexed);
        }
        zindexed.add(new ZIndexWrapper(guiMsgPlace, 10));
      }
    };
    inset.put("cont", content);
    inset.put("guimsgplace", guiMsgPlace);
   
    modalPanel.pushContent(inset);
    // the links in the panel cannot be clicked because of the alpha-blended background over it, but if user chooses own css style ->
    // FIXME:fj:b panel.setEnabled(false) causes effects if there is an image component in the panel -> the component is not dispatched
    // and thus renders inline and wastes the timestamp.
View Full Code Here

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

  /* (non-Javadoc)
   * @see org.olat.core.gui.control.GuiStack#pushModalDialog(java.lang.String, org.olat.core.gui.components.Component)
   */
  public void pushModalDialog(Component content) {
    // wrap the component into a modal foreground dialog with alpha-blended-background
    VelocityContainer inset = new VelocityContainer("simpleinset", VELOCITY_ROOT + "/simpleinset.html", null, null);
    inset.put("cont", content);
    contentPanel.pushContent(inset);
  }
View Full Code Here

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

  public CustomLinkChooserController(UserRequest ureq, WindowControl wControl, CustomLinkTreeModel customLinkTreeModel) {
    super(wControl);

    trans = new PackageTranslator(PACKAGE, ureq.getLocale());

    mainVC = new VelocityContainer("mainVC", VELOCITY_ROOT + "/internallinkchooser.html", trans, this);

    this.customLinkTreeModel = customLinkTreeModel;
    boolean ajax = getWindowControl().getWindowBackOffice().getWindowManager().isAjaxEnabled();
    if (ajax) {
      // For real browsers we use the cool ajax tree
View Full Code Here

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

  AjaxController(UserRequest ureq, final WindowBackOfficeImpl wboImpl, boolean ajaxEnabled, String iframeName) {
    super(null);
    this.wboImpl = wboImpl;
    this.ajaxEnabled = ajaxEnabled;
    pollPeriodContent = new VelocityContainer("jsserverpartpoll", VELOCITY_ROOT + "/pollperiod.html", null, this);
    pollPeriodContent.contextPut("pollperiod", new Integer(pollperiod));
   
    myContent = new VelocityContainer("jsserverpart", VELOCITY_ROOT + "/serverpart.html", null, this);
    myContent.contextPut("highlight", Boolean.FALSE);
    myContent.contextPut("pollperiod", new Integer(pollperiod));
   
    //more debug information: OLAT-3529
    if (ajaxEnabled) myContent.contextPut("isAdmin", Boolean.valueOf(ureq.getUserSession().getRoles().isOLATAdmin()));
View Full Code Here

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

    // main layout/structure
    mainPanel = new Panel("brasatoMainPanel");
    mainPanel.setDomReplaceable(false);

    mainvc = new VelocityContainer("baseccvc", VELOCITY_ROOT + "/body.html", translator, 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)
    mainvc.setDomReplaceable(false);
View Full Code Here

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

   * @param translator
   */
  private FormLayoutContainer(String name, Translator formTranslator, String page) {
    super(name);
    //
    this.formLayoutContainer = new VelocityContainer(name, page, formTranslator, null);
    this.translator = formTranslator;//
    // add the form decorator for the $f.hasError("ddd") etc.
    formLayoutContainer.contextPut("f", new FormDecoratorImpl(this));
    // this container manages the form items, the GUI form item componentes are
    // managed in the associated velocitycontainer
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.