Package org.olat.core.gui.components.form.flexible.impl

Examples of org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer


    String[] values = new String[] {translator.translate("form.clean.catalog"), translator.translate("form.clean.groups")};
    checkboxClean = uifactory.addCheckboxesVertical("form.clean.catalog", null, formLayout, keys, values, null, 1);
   
    submit = new FormSubmit("next", "next");
    back = new FormReset("back", "back");
    FormLayoutContainer horizontalL = FormLayoutContainer.createHorizontalFormLayout("horiz", getTranslator());
    formLayout.add(horizontalL);
    horizontalL.add(back);
    horizontalL.add(submit);
   
  }
View Full Code Here


    }

    @SuppressWarnings({ "unused", "unchecked"})
    @Override
    protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
      FormLayoutContainer formLayoutVertical = FormLayoutContainer.createVerticalFormLayout("vertical", getTranslator());
      formLayout.add(formLayoutVertical);

      idents = (List<Object>) getFromRunContext("idents");
      newIdents = (ArrayList<List<String>>) getFromRunContext("newIdents");
      textContainer = FormLayoutContainer.createCustomFormLayout("step1", getTranslator(), this.velocity_root + "/step1.html");
      formLayoutVertical.add(textContainer);

      int cntall = idents.size();
      int cntNew = newIdents.size();
      int cntOld = cntall - cntNew;
      textContainer.contextPut("newusers", newUsers);
View Full Code Here

    @SuppressWarnings("unchecked")
    @Override
    protected void initForm(FormItemContainer formLayout, @SuppressWarnings("unused")
    Controller listener, UserRequest ureq) {
      FormLayoutContainer formLayoutVertical = FormLayoutContainer.createVerticalFormLayout("vertical", getTranslator());
      formLayout.add(formLayoutVertical);

      setFormTitle("title");
      List<List<String>> mergedDataChanges = new ArrayList<List<String>>();
     
      textContainer = FormLayoutContainer.createCustomFormLayout("index", getTranslator(), this.velocity_root + "/step2.html");
      formLayoutVertical.add(textContainer);
      boolean validChange = (Boolean) getFromRunContext("validChange");
      textContainer.contextPut("validChange", validChange);
      if (!validChange) return;

      List<Identity> selectedIdentities = (List<Identity>) getFromRunContext("identitiesToEdit");
View Full Code Here

    initForm(ureq);   
  }
 
  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FormLayoutContainer verticalL = FormLayoutContainer.createVerticalFormLayout("verticalL", getTranslator());
    formLayout.add(verticalL);
    nbrSessions = uifactory.addIntegerElement("nbr.session", "nbr.session.label", 0, verticalL);
    Submit oldestSessionButton = new FormSubmit("save","oldest.session.button");
    formLayout.add(oldestSessionButton)
 
View Full Code Here

        enableAutoCloseRanks.select("create.form.enableAutoCloseRanks", businessGroup.getAutoCloseRanksEnabled());
      }
    }

    // Create submit and cancel buttons
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
    formLayout.add(buttonLayout);
    uifactory.addFormSubmitButton("finish", buttonLayout);
    uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());
  }
View Full Code Here

    this.textAboutMe = uifactory.addRichTextElementForStringData("form.text", "form.text", this.conf.getTextAboutMe(), 10, -1, false, false, null, null, formLayout, ureq.getUserSession(), getWindowControl());
    this.textAboutMe.setMaxLength(10000);
    this.formItems.put("form.text", this.textAboutMe);
   
    // Create submit and cancel buttons
    FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
    formLayout.add(buttonLayout);
    uifactory.addFormSubmitButton("save", buttonLayout);
    uifactory.addFormCancelButton("cancel", buttonLayout, ureq, getWindowControl());
    formItems.put("buttonLayout", buttonLayout);
   
View Full Code Here

    // Preview selection only visible if type == manual
    RulesFactory.createShowRule(this.type, TaskController.TYPE_MANUAL, this.preview, formLayout);
    RulesFactory.createHideRule(this.type, TaskController.TYPE_AUTO, this.preview, formLayout);

    // Create submit button
    final FormLayoutContainer buttonLayout = FormLayoutContainer.createButtonLayout("buttonLayout", getTranslator());
    formLayout.add(buttonLayout);
    uifactory.addFormSubmitButton("submit", buttonLayout);
  }
View Full Code Here

    attachmentFileName.addActionListener(this, FormEvent.ONCHANGE);

    mailNotification = uifactory.addCheckboxesHorizontal("detailsform.mail.notification.label", formLayout, keys, values, null);
    mailNotification.select(keys[0], project.isMailNotificationEnabled());
   
    FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator());
    formLayout.add(buttonGroupLayout);
    uifactory.addFormSubmitButton("save", buttonGroupLayout);
    if (this.enableCancel) {
      uifactory.addFormCancelButton("cancel", buttonGroupLayout, ureq, getWindowControl());//TODO: Frage an PB: Warum flc hier noetig ???
    }
View Full Code Here

        /*
         * create error with link to fix it
         */
        String vc_errorPage = velocity_root + "/erroritem.html";
        FormLayoutContainer errorGroupItemLayout = (FormLayoutContainer) FormLayoutContainer.createCustomFormLayout("errorgroupitem",
            getTranslator(), vc_errorPage);

        boolean hasDefaultContext = getDefaultBGContext() != null;
        if (hasDefaultContext) {
          groupChooseSubContainer.setErrorComponent(errorGroupItemLayout, this.flc);
          // FIXING LINK ONLY IF A DEFAULTCONTEXT EXISTS
          fixGroupError = new FormLinkImpl("error.fix", "create");
          // link
          fixGroupError.setCustomEnabledLinkCSS("b_button");
          errorGroupItemLayout.add(fixGroupError);

          fixGroupError.setErrorKey(labelKey, params);
          fixGroupError.showError(true);
          fixGroupError.showLabel(false);
          // hinty to pass the information if one group is
          // missing or if 2 or more groups are missing
          // (see fixGroupErrer.getUserObject to understand)
          // e.g. if userobject String[].lenght == 1 -> one group only
          // String[].lenght > 1 -> show bulkmode creation group
          if (missingGroups.size() > 1) {
            fixGroupError.setUserObject(new String[] { csvMissGrps, "dummy" });
          } else {
            fixGroupError.setUserObject(new String[] { csvMissGrps });
          }
        } else {
          // fix helper link not possible -> errortext only
          groupChooseSubContainer.setErrorKey(labelKey, params);
        }
        /*
         *
         */
        groupChooseSubContainer.showError(true);
      } else {
        // no more errors
        groupChooseSubContainer.clearError();
      }
    }
    if (!easyAreaTE.isEmpty()) {
      // check whether areas exist
      activeAreaSelection = easyAreaTE.getValue().split(",");
      boolean exists = false;
      Set<String> missingAreas = new HashSet<String>();
      for (int i = 0; i < activeAreaSelection.length; i++) {
        String trimmed = activeAreaSelection[i].trim();
        exists = cev.existsArea(trimmed);
        if (!exists) {
          missingAreas.add(trimmed);
        }
      }
      if (missingAreas.size() > 0) {
        retVal = false;
        String labelKey = missingAreas.size() == 1 ? "error.notfound.name" : "error.notfound.names";
        String csvMissAreas = StringHelper.formatAsCSVString(missingAreas);
        String[] params = new String[] { "-", csvMissAreas };

        /*
         * create error with link to fix it
         */
        String vc_errorPage = velocity_root + "/erroritem.html";
        FormLayoutContainer errorAreaItemLayout = (FormLayoutContainer) FormLayoutContainer.createCustomFormLayout("errorareaitem",
            getTranslator(), vc_errorPage);
        boolean hasDefaultContext = getDefaultBGContext() != null;
        if (hasDefaultContext) {
          areaChooseSubContainer.setErrorComponent(errorAreaItemLayout, this.flc);
          // FXINGIN LINK ONLY IF DEFAULT CONTEXT EXISTS
          fixAreaError = new FormLinkImpl("error.fix", "create");// erstellen
          // link
          fixAreaError.setCustomEnabledLinkCSS("b_button");
          errorAreaItemLayout.add(fixAreaError);

          fixAreaError.setErrorKey(labelKey, params);
          fixAreaError.showError(true);
          fixAreaError.showLabel(false);
          // hint to pass the information if one area is
View Full Code Here

    firstName = uifactory.addTextElement("firstname", "search.form.first", 256, "", formLayout);
    firstName.setNotEmptyCheck("error.firstname.mandatory");
    firstName.setMandatory(true);
   
    //create a new layout to group the buttons of the form
    FormLayoutContainer buttonGroupLayout = FormLayoutContainer.createButtonLayout("buttonGroupLayout", getTranslator());
    formLayout.add(buttonGroupLayout);
   
    //now add the buttons into their new  group layout
    uifactory.addFormSubmitButton("submit", buttonGroupLayout);
    uifactory.addFormCancelButton("cancel", buttonGroupLayout, ureq, getWindowControl());
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.form.flexible.impl.FormLayoutContainer

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.