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

Examples of org.olat.core.gui.components.form.flexible.elements.FormLink


    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

  protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (event instanceof FormEvent) {
      FormEvent fe = (FormEvent) event;
      FormItem sourceItem = fe.getFormItemSource();
      if (source instanceof FormLink) {
        FormLink link = (FormLink)source;
        if (link.getName().equals(ADD_FIELD_LINK)) {
          if (customFields.size() < MAX_NBR_CUSTOM_FIELDS) {
            // Add new custom-field
            int indexNewCustomField = customFields.size();
            customFields.add(new CustomField("","",false));
            // first remove existing submit button, add it again at the end
            flc.remove(formSubmit);
            createFormElemente( this.flc, indexNewCustomField, customFields.get(indexNewCustomField));           
            formSubmit = uifactory.addFormSubmitButton("save", this.flc);
          } else {
            this.showInfo("info.max.nbr.custom.fields");
          }
        } else {
          int deleteElementNumber = ((Integer)link.getUserObject()).intValue();
          getLogger().debug("remove customfield #=" + deleteElementNumber);
          CustomField customField = customFields.remove(deleteElementNumber);
          initFormElements(flc);
        }
      }
View Full Code Here

   
    MultipleSelectionElement tableEnabledElement = uifactory.addCheckboxesHorizontal("customfield.table.enabled." + i, null, formLayout, keys, values, null);
    tableEnabledElement.select(keys[0], customField.isTableViewEnabled());
    customFieldTableFlagElementList.add(tableEnabledElement);

    FormLink deleteLink = uifactory.addFormLink("customfield.delete.link." + i, formLayout,Link.BUTTON_SMALL);
    deleteLink.setUserObject(new Integer(i));
    customFieldLinkElementList.add(deleteLink);
   
    SpacerElement spacerElement = uifactory.addSpacerElement("spacer" + i, formLayout, false);
    customFieldSpacerElementList.add(spacerElement);
  }
View Full Code Here

TOP

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

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.