Examples of StaticTextElement


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

   * @param translatedText
   * @param formLayout
   * @return
   */
  public StaticTextElement addStaticTextElement(String name, String i18nLabel,String translatedText, FormItemContainer formLayout) {
    StaticTextElement ste = new StaticTextElementImpl(name,translatedText);
    setLabelIfNotNull(i18nLabel, ste);
    formLayout.add(ste);
    return ste;
  }
View Full Code Here

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

      TreeNode tn = treemodel.getNodeById(keys[i]);
      if(selectableFilter.accept(tn)){
        CheckboxElementComponent ssec = new CheckboxElementComponent(getName()+"_"+keys[i], translator, this, i, null);
        checkboxitems.put(keys[i], ssec);
      }else{
        StaticTextElement ste = new StaticTextElementImpl(keys[i], tn.getTitle());
        ste.setRootForm(this.getRootForm());
        checkboxitems.put(keys[i], new StaticTextElementComponent(ste));
      }
    }
    component.setComponents(checkboxitems);
  }
View Full Code Here

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

   
    // load preferences
    Preferences prefs = tobeChangedIdentity.getUser().getPreferences();

    // Username
    StaticTextElement username = uifactory.addStaticTextElement("form.username", tobeChangedIdentity.getName(), formLayout);
    username.setEnabled(false);

    // Language
    Map<String, String> languages = I18nManager.getInstance().getEnabledLanguagesTranslated();
    String[] langKeys = StringHelper.getMapKeysAsStringArray(languages);
    String[] langValues = StringHelper.getMapValuesAsStringArray(languages);
View Full Code Here

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

    // Add the noneditable username field.
    MultipleSelectionElement usernameCheckbox = uifactory.addCheckboxesHorizontal("checkbox_username", null, formLayout, new String[] {"checkbox_username"}, new String[] {""}, null);
    usernameCheckbox.select("checkbox_username", true);
    usernameCheckbox.setEnabled(false);
    StaticTextElement usernameText = uifactory.addStaticTextElement("username", this.identity.getName(), formLayout);
    usernameText.setMandatory(true);
    this.formItems.put("username", usernameText);
   
    String currentGroup = null;
    List<UserPropertyHandler> homepagePropertyHanders = UserManager.getInstance().getUserPropertyHandlersFor(HomePageConfig.class.getCanonicalName(), isAdministrativeUser);
    // show a form element for each property handler
View Full Code Here

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

    title.setMandatory(true);
    title.setNotEmptyCheck("form.imd.error.empty.title");

    // Question Type
    String typeName = getType();
    StaticTextElement type = uifactory.addStaticTextElement("type", "form.imd.type", typeName, formLayout);

    // Description
    desc = uifactory.addRichTextElementForStringData("desc", "form.imd.descr", item.getObjectives(), 8, -1, false, true, null, null,
        formLayout, ureq.getUserSession(), getWindowControl());
    RichTextConfiguration richTextConfig = desc.getEditorConfiguration();
View Full Code Here

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

   
    // test for inline editable label field
    // the inlineLable is used as Label for the addStaticTextElement
    // Avoid translation error by setting i18nLabel key null first and then set the LabelComponent, and also you need to call showLabel(true)
    inlineLabel = formUIf.addInlineTextElement("inline.label.int"+i+ii+1, "mytext"+i+ii+1, formLayout, null);
    StaticTextElement theElement = formUIf.addStaticTextElement("inline.label.text"+i+ii,  null,"my bony", formLayout);
    theElement.setLabelComponent(inlineLabel, formLayout).showLabel(true);
   
   
  }
View Full Code Here

Examples of org.olat.core.gui.formelements.StaticTextElement

        renderWikiMarkupTextAreaElementAutoSize(f, te, sb, true);
      } else if (fe instanceof TextAreaElement) {
        TextAreaElement te = (TextAreaElement) fe;
        renderTextAreaElement(f, te, sb, false, args);
      } else if (fe instanceof StaticTextElement) {
        StaticTextElement ste = (StaticTextElement) fe;
        renderStaticTextElement(ste, sb);
      } else if (fe instanceof StaticHTMLTextElement) {
        StaticHTMLTextElement ste = (StaticHTMLTextElement) fe;
        renderStaticHTMLTextElement(ste, sb);
      } else if (fe instanceof PasswordElement) {
View Full Code Here

Examples of org.olat.core.gui.formelements.StaticTextElement

      // preselect calendar if available
      chooseCalendar.select(choosenWrapper.getKalendar().getCalendarID(), true);
      addFormElement("cal.form.chooseCalendar", chooseCalendar);
    } else {
      // display calendar name
      calendarName = new StaticTextElement("cal.form.calendarname", choosenWrapper.getKalendarConfig().getDisplayName());
      addFormElement("cal.form.calendarname", calendarName);
    }
   
    // subject (hide if in readonly mode and only free/busy flag)
    subject = new TextAreaElement("cal.form.subject", 3, 40);
View Full Code Here

Examples of org.olat.core.gui.formelements.StaticTextElement

    super(name, translator);
    this.readOnly = readOnly;
    this.recipientsAreEditable = hasRecipientsEditable;
    setRecipientsEditableTo(recipientsAreEditable);
    setEmailFrom(emailFrom);
    addFormElement("tto", new StaticTextElement(NLS_CONTACT_TO, " "));
    addFormElement("tcpfrom", new CheckBoxElement(NLS_CONTACT_SEND_CP_FROM, true));
    setSubject(null);
    setBody(null);
   
    addSubmitKey("msg.save");
View Full Code Here

Examples of org.olat.core.gui.formelements.StaticTextElement

   */
  private void setEmailFrom(final Identity emailFromIdentity) {
    //fetch sender if one, otherwise field is editable
    String defaultEmailFrom = ((emailFromIdentity != null) ? (emailFromIdentity.getUser().getProperty(UserConstants.EMAIL, getLocale())) : (null));
    if (defaultEmailFrom != null || readOnly) {
      tfrom = new StaticTextElement(NLS_CONTACT_FROM, defaultEmailFrom);
    } else {
      tfrom = new TextElement(NLS_CONTACT_FROM, 255);
      tfrom.setMandatory(true);
    }
    addFormElement("tfrom", tfrom);
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.