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

Examples of org.olat.core.gui.components.form.flexible.impl.elements.FormLinkImpl


    mode.select(checkpoint.getMode(), checkpoint.getMode() != null);
    mode.setUserObject(checkpoint);
    modeInputList.add(index, mode);
   
    // add link add action button
    FormLink addButton = new FormLinkImpl("add" + counter, "add" + counter, "cl.table.add", Link.BUTTON_SMALL);
    addButton.setUserObject(checkpoint);
    titleContainer.add(addButton);
    addButtonList.add(index, addButton);
    // add link deletion action button
    FormLink delButton = new FormLinkImpl("delete" + counter, "delete" + counter, "cl.table.delete", Link.BUTTON_SMALL);
    delButton.setUserObject(checkpoint);
    titleContainer.add(delButton);
    delButtonList.add(index, delButton);
    // increase the counter to enable unique component names
    counter++;
  }
View Full Code Here


    lComment.setDisplaySize(20);
    lComment.setUserObject(link);
    lCommentInputList.add(index, lComment);
   
    // add link add action button
    FormLink addButton = new FormLinkImpl("add" + counter, "add" + counter, "ll.table.add", Link.BUTTON_SMALL);
    addButton.setUserObject(link);
    titleContainer.add(addButton);
    lAddButtonList.add(index, addButton);
    // add link deletion action button
    FormLink delButton = new FormLinkImpl("delete" + counter, "delete" + counter, "ll.table.delete", Link.BUTTON_SMALL);
    delButton.setUserObject(link);
    titleContainer.add(delButton);
    lDelButtonList.add(index, delButton);
    // increase the counter to enable unique component names
    counter++;
  }
View Full Code Here

    groupChoice = new SingleSelectionImpl("cl.choice.groups", SingleSelectionImpl.createSelectboxLayouter("cl.choice.groups"));
    groupChoice = uifactory.addDropdownSingleselect("cl.choice.groups", "cl.choice.groups", mainLayout, keys, values, null);
    groupChoice.addActionListener(this, FormEvent.ONCHANGE);
    groupChoice.select(CHOICE_ALL, true);
   
    exportButton = new FormLinkImpl(EXPORT_TABLE, EXPORT_TABLE, EXPORT_TABLE, Link.BUTTON);
    mainLayout.add(exportButton);
  }
View Full Code Here

  @SuppressWarnings("unused")
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    FormLayoutContainer mainLayout = FormLayoutContainer.createHorizontalFormLayout("mainLayout", getTranslator());
    formLayout.add(mainLayout);
    if(canManage) {
      manageCheckpointsBtn = new FormLinkImpl("manageCheckpointsButton", MANAGE_CHECKPOINT.getCommand(), "cl.manage.button", Link.BUTTON);
      mainLayout.add(manageCheckpointsBtn);
    }
    if(canEdit) {
      configCheckpointsBtn = new FormLinkImpl("configCheckpointsButton", CONFIG_CHECKPOINT.getCommand(), "cl.config.button", Link.BUTTON);
      mainLayout.add(configCheckpointsBtn);
    }
  }
View Full Code Here

  }

  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener,
      UserRequest ureq) {
    addParticipant = new FormLinkImpl("addParticipantsButton", ADD_PARTICIPANTS.getCommand(), "participants.add", Link.BUTTON);
    formLayout.add(addParticipant);
  }
View Full Code Here

    initForm(this.flc, this, ureq);
  }

  @Override
  protected void initForm(FormItemContainer formLayout, Controller listener, UserRequest ureq) {
    manageDatesBtn = new FormLinkImpl("preferencesButton", MANAGE_EVENT.getCommand(), "config.dates", Link.BUTTON);
    enrollmentListBtn = new FormLinkImpl("enrollmentListButton", LIST_EVENT.getCommand(), "run.enrollment.list", Link.BUTTON);
    formLayout.add(manageDatesBtn);
    formLayout.add(enrollmentListBtn);
  }
View Full Code Here

    /*
     * check for defaultcontext
     */
    boolean hasDefaultContext = getDefaultBGContext() != null;
    //
    chooseGroupsLink = new FormLinkImpl("choosegroups", "choose");
    chooseGroupsLink.setCustomEnabledLinkCSS("b_form_groupchooser");

    // prepare create groups link which is used instead of chooseGroupsLink in
    // the
    // case where no groups are configured in the groupmanagement
    createGroupsLink = new FormLinkImpl("choosegroups", "create");
    createGroupsLink.setCustomEnabledLinkCSS("b_form_groupchooser");

    // create groups if no groups in groupmanagement, and default context
    // available
    groupChooseSubContainer.add(hasDefaultContext && !hasGroups ? createGroupsLink : chooseGroupsLink);

    areaChooseSubContainer = (FormLayoutContainer)FormLayoutContainer.createHorizontalFormLayout("areaChooseSubContainer", getTranslator());
    areaChooseSubContainer.setLabel("form.areanames", null);
    formLayout.add(areaChooseSubContainer);   

    easyAreaTE = uifactory.addTextElement("area", null, 1024, areaInitVal, areaChooseSubContainer);
    easyAreaTE.setDisplaySize(24);
    easyAreaTE.setExampleKey("form.areanames.example", null);
   
    chooseAreasLink = new FormLinkImpl("chooseareas", "choose");
    chooseAreasLink.setCustomEnabledLinkCSS("b_form_groupchooser");

    // prepare create are link which is used instead of choose area link in the
    // case where no areas are configured in the groupmanagement
    createAreasLink = new FormLinkImpl("chooseareas", "create");
    createAreasLink.setCustomEnabledLinkCSS("b_form_groupchooser");
    //
    areaChooseSubContainer.add(hasDefaultContext && !hasAreas ? createAreasLink : chooseAreasLink);

    //
View Full Code Here

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

    FormItemContainer buttonContainer = FormLayoutContainer.createHorizontalFormLayout("buttonContainer", getTranslator());
    formLayout.add(buttonContainer);

    // Submit buttons
    lSave = new FormLinkImpl("lSave", "lSave", "submit", Link.BUTTON);
    lSave.addActionListener(this, FormEvent.ONCLICK);

    lSaveandclose = new FormLinkImpl("lSaveandclose", "lSaveandclose", "saveandclose", Link.BUTTON);

    lSaveandclose.addActionListener(this, FormEvent.ONCLICK);
    buttonContainer.add(lSave);
    buttonContainer.add(lSaveandclose);
View Full Code Here

    setFormTitle("note", new String[] { n.getNoteTitle() });
    // set custom css style to override default read-only view of rich text element
    setFormStyle("o_notes");

    // we don't use FormUIFactory.addFormSubmitButton(...) here since that would cause the following custom CSS setting to get ignored.
    editButton = new FormLinkImpl("edit", "edit", "edit", Link.BUTTON_SMALL);
    editButton.setCustomEnabledLinkCSS("b_float_right b_button b_small");
    formLayout.add(editButton);
   
    noteField = uifactory.addRichTextElementForStringData("noteField", null, n.getNoteText(), 20, -1, false, false, null, null, formLayout, ureq.getUserSession(), getWindowControl());
    noteField.setEnabled(false);
View Full Code Here

TOP

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

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.