Package org.olat.core.gui.formelements

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


    // title
    title = new TitleElement("guidemo.form.title");
    addFormElement("title", title);
   
    // text
    text = new TextElement("guidemo.form.text", 50);
    text.setMandatory(true);
    text.setExample("You may give examples for any form field, whcih is shown below the field.");
    text.setPopupData(new PopupData("textarea", "popup", "guidemo.gorm.popup", 100, 100));
    addFormElement("text", text);
   
    // readonly
    readonly = new TextElement("guidemo.form.readonly", 10);
    readonly.setValue("readonly");
    readonly.setReadOnly(true);
    addFormElement("readonly", readonly);

    // date chooser
    date = new TextElement("guidemo.form.date", 10);
    date.setDateChooserDateFormat("%d.%m.%Y");
    date.setUseDateChooser(true);
    date.setExample("Format: dd.mm.yyyy [e.g. 17.04.2007]");
    addFormElement("date", date);
   
View Full Code Here


  /**
   * Initialize form.
   */
  public void init() {
    login = new TextElement("lf.login", "", false, 128);
    login.setSize(20);
    addFormElement("lf_login", login);
   
    pass = new PasswordElement("lf.pass", 20, 50);
    addFormElement("lf_pass", pass);
View Full Code Here

  /**
   * Initialize the form.
   */
  private void init() {
    login = new TextElement("srf.login", "", true, 128);
    login.setExample(translate("srf.login.example"));
    addFormElement("srf_login", login);
    addSubmitKey("save", "save");
  }
View Full Code Here

  /**
   * Initialize search form.
   */
  public void init() {
   
    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);
   
    description = new TextElement("cif.description", "", false, 255);
    addFormElement("cif_description", description);
   
    if (isAdmin) {
      id = new IntegerElement("cif.id");
      addFormElement("cif_id", id);
View Full Code Here

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

    groupNames.setMandatory(true);
    groupNames.setExample(translate("bgcopywizard.multiple.groupnames.example"));
    addFormElement("groupNames", groupNames);

    String maxString = (defaultMaxValue == null ? null : defaultMaxValue.toString());
    bgMax = new TextElement("create.form.title.max", maxString, false, 6, 5);
    addFormElement("fe_bgMax", bgMax);

    setSubmitKey("finish"); // wizard style
  }
View Full Code Here

    String user = (String)config.get(CONFIGKEY_USER);
    String pass = (String)config.get(CONFIGKEY_PASS);

    String fullURI = getFullURL(proto, host, port, uri, query).toString();
   
    thost = new TextElement("TUConfigForm.url", fullURI, true, 60, 255);
    thost.setExample("http://www.yourserver.com/page.html");
    addFormElement("host", thost);
    addFormElement("st", new SpacerElement(true, false));
   
    // new radio button element
    String[] selectableValues = new String[] {
        OPTION_TUNNEL_THROUGH_OLAT_INLINE,
        OPTION_TUNNEL_THROUGH_OLAT_IFRAME,
        OPTION_SHOW_IN_OLAT_IN_AN_IFRAME,
        OPTION_SHOW_IN_NEW_BROWSER_WINDOW
    };
    String[] selectableLabels = new String[] {
        translate(NLS_OPTION_TUNNEL_INLINE_LABEL),
        translate(NLS_OPTION_TUNNEL_IFRAME_LABEL),
        translate(NLS_OPTION_OLAT_IFRAME_LABEL),
        translate(NLS_OPTION_EXTERN_PAGE_LABEL)
    };
    StaticHTMLTextElement expl = new StaticHTMLTextElement(NLS_DESCRIPTION_LABEL, translate(NLS_DESCRIPTION_PREAMBLE), 32600);
    addFormElement("expl", expl);
   
    String loadedConfig = convertConfigToNewStyle(config);
    selectables = new RadioButtonGroupElement(true, NLS_DISPLAY_CONFIG_EXTERN, selectableValues, selectableLabels);
    selectables.select(loadedConfig, true);
    selectables.setNoLabel(true);
    selectables.setHTMLIsAllowed(true);
    addFormElement("selectables",  selectables);
    addFormElement("s3", new SpacerElement(false, true));

    tuser = new TextElement("TUConfigForm.user", (user == null) ? "" : user, 255);
    tpass = new PasswordElement("TUConfigForm.pass", 255);
    tpass.setValue((pass == null) ? "" : pass);

    addFormElement("user", tuser);
    addFormElement("pass", tpass);
View Full Code Here

   */
  @SuppressWarnings("unused")
  public UserSearchForm(String name, Translator translator, boolean isAdmin, boolean cancelbutton, boolean statusEnabled) {
    super(name, translator);
    this.isAdmin = isAdmin;
    addFormElement("login", new TextElement("search.form.login", 128));
   
    UserManager um = UserManager.getInstance();
    userPropertyHandlers = um.getUserPropertyHandlersFor(formIdentifyer, isAdmin);
    // Add all available user fields to this form
    for (UserPropertyHandler userPropertyHandler : userPropertyHandlers) {
View Full Code Here

   
    userList = new TextAreaElement("delete.list", 10, 35, null);
    userList.setExample(translator.translate("delete.list.example"));
    userList.setMandatory(true);
   
    reason = new TextElement("delete.reason", null, true, 35, 100);
   
    addFormElement("userlist", userList);
    addFormElement("reason", reason);
    addSubmitKey("button.delete.users", "subm");
  }
View Full Code Here

   */
  public UsermanagerUserSearchForm(String name, Translator translator) {
    super(name, translator);
    // regular search fields
    addFormElement("title.user", new TitleElement("search.form.title.user"));
    login = new TextElement("search.form.login", 128);
    addFormElement("login", login);

    // search user fields
    UserManager um = UserManager.getInstance();
    userPropertyHandlers = um.getUserPropertyHandlersFor(formIdentifyer, true);
View Full Code Here

TOP

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

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.