Package org.olat.core.gui.formelements

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


      // 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

    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

   */
  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

  /**
   * @param defaultSubject
   */
  public void setSubject(final String defaultSubject) {
    if(readOnly){
      tsubject = new StaticTextElement(NLS_CONTACT_SUBJECT, defaultSubject);
    }else{
      tsubject = new TextElement(NLS_CONTACT_SUBJECT, defaultSubject, 255);
      tsubject.setMandatory(true);
    }
    addFormElement("tsubject", tsubject);
View Full Code Here

      if (defaultEmailTo.length() > (3 * emailCols)) {
        defaultEmailTo = defaultEmailTo.substring(0, 3 * emailCols - 1);
        defaultEmailTo += "\n. . . ";
      }
      if (formFieldAlreadyAdded) tto.setValue(defaultEmailTo);
      else tto = new StaticTextElement(NLS_CONTACT_TO, defaultEmailTo);
    } else {
      //recipients field editable
      if (!formFieldAlreadyAdded) ttoBig = new TextAreaElement(NLS_CONTACT_TO, 2, emailCols);
      //recipients field filled with addresses and even editable
      ttoBig.setValue(defaultEmailTo);
View Full Code Here

        ttoBig.setValue(tto.getValue());
        tto = null;
        //removeFormElement(tto);
        addFormElement("tto", ttoBig);
      } else {
        tto = new StaticTextElement(NLS_CONTACT_TO, ttoBig.getValue());
        ttoBig = null;
        //removeFormElement(ttoBig);
        addFormElement("tto", tto);
      }
    }
View Full Code Here

   
    displayName = new TextElement("cif.displayname", "", false, 255);
    addFormElement("cif_displayname", displayName);
   
    if(limitUsername != null) {
      author = new StaticTextElement("cif.author", limitUsername);
      author.setValue(limitUsername);
    } else {
      author = new TextElement("cif.author", "", false, 255);
    }
    addFormElement("cif_author", author);
View Full Code Here

  /**
   * Initialize form data based on repository entry.
   */
  public void init() {
    if (enableAuthorView) {
      addFormElement("cif_id", new StaticTextElement("cif.id", entry.getKey() != null ? entry.getKey().toString() : translate("cif.id.na")));
    }
    displayName = new TextElement("cif.displayname", entry.getDisplayname(), true, MAX_DISPLAYNAME);
    displayName.setMaxLength(100);
    addFormElement("cif_displayname", displayName);
    initialAuthor = new StaticTextElement("cif.initialAuthor", entry.getInitialAuthor());
    addFormElement("cif_initialAuthor", initialAuthor);
   
    // for empty TextAreas, put at least a space so that TextArea gets displayed correctly
    description = new TextAreaElement("cif.description", 4, 40, (entry.getDescription() != null) ? entry.getDescription() : " ");
    description.setMandatory(true);
    addFormElement("cif_description", description);
    resourceName = new StaticTextElement("cif.resourcename", (entry.getResourcename() == null) ? "-" : entry.getResourcename());
    resourceName.setMaxLength(100);
    addFormElement("cif_resourcename", resourceName);
   
    StringBuilder typeDisplayText = new StringBuilder(100);
    if (typeName != null) { // add image and typename code
View Full Code Here

  /**
   * Initialize form.
   */
  private void init() {
    login = new StaticTextElement("smf.login", authentication.getIdentity().getName());
    addFormElement("smf_login", login);
   
    password = new PasswordElement("smf.password", 255);
    addFormElement("smf_password", password);
   
View Full Code Here

TOP

Related Classes of org.olat.core.gui.formelements.StaticTextElement

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.