Package org.olat.core.gui.formelements

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


   */
  public ConditionConfigExpertForm(String name, Translator translator, Condition cond, UserCourseEnvironment euce) {
    super(name, translator);
    this.euce = euce;
    this.conditionId = cond.getConditionId();
    tprecond = new TextAreaElement("form.expert.condition", 6, 45, (cond == null ? "" : cond.getConditionExpression()));
    addFormElement("precond", tprecond);
    setSubmitKey("save");
    setCancelButton();
  }
View Full Code Here


   * @return Condition The updated condition or null if condition was empty
   */
  public Condition updateConditionFromFormData(Condition cond) {
    if (cond == null) cond = new Condition();

    TextAreaElement el = getTextAreaElement("precond");
    if (el != null) cond.setConditionExpression(el.getValue());

    cond.setExpertMode(true);
    cond.setConditionId(conditionId);
    if (StringHelper.containsNonWhitespace(cond.getConditionExpression())) { return cond; }
    cond.setConditionExpression(null);
View Full Code Here

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

   * @param trans The form translator
   * @param defaultMaxValue The max value taken from original group
   */
  public GroupNamesForm(String name, Translator translator, Integer defaultMaxValue) {
    super(name, translator);
    groupNames = new TextAreaElement("bgcopywizard.multiple.groupnames", 4, 40);
    groupNames.setMandatory(true);
    groupNames.setExample(translate("bgcopywizard.multiple.groupnames.example"));
    addFormElement("groupNames", groupNames);

    String maxString = (defaultMaxValue == null ? null : defaultMaxValue.toString());
View Full Code Here

  private TextAreaElement remoteIps;
  private TextAreaElement usernames;

  public RequestLoglevelForm(String name, Translator translator) {
    super(name, translator);
    remoteIps = new TextAreaElement("requestloglevel.ips", 10, 60, null);
   
    String ipsAndLevels = RequestBasedLogLevelManager.loadIpsAndLevels();
    if (ipsAndLevels!=null) {
      remoteIps.setValue(ipsAndLevels);
    }
   
    addFormElement("requestloglevel.ips", remoteIps);
   
    usernames = new TextAreaElement("requestloglevel.usernames", 10, 60, null);

    String usernameAndLevels = UserBasedLogLevelManager.loadUsernameAndLevels();
    if (usernameAndLevels!=null) {
      usernames.setValue(usernameAndLevels);
    }
View Full Code Here

  public EditScoreCalculationExpertForm(String name, Translator translator, UserCourseEnvironment euce, List<CourseNode> assessableNodesList) {
    super(name, translator);
    this.euce = euce;
    this.assessableNodesList = assessableNodesList;
   
    tscoreexpr =  new TextAreaElement("scorecalc.score", 6, 45);
    tscoreexpr.setExample(GET_SCORE_69741247660309_2);
    tpassedexpr =  new TextAreaElement("scorecalc.passed", 6, 45);
    tpassedexpr.setExample(GET_PASSED_69741247660309);
    addFormElement("tscoreexpr", tscoreexpr);
    addFormElement("tpassedexpr", tpassedexpr);
    setSubmitKey("save");
    setCancelButton();
View Full Code Here

  private TextElement reason;
 
  public UserListForm(String name, Translator translator) {
    super(name, translator);
   
    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);
   
View Full Code Here

   * @param name the technical name of the component
   * @param cancelbutton if true, a cancelbutton is offered
   */
  public TextForm(String name, Translator translator, String content, boolean offerCancel) {
    super(name, translator);
    textF = new TextAreaElement("textarea", 25,100);
    textF.setValue(content);
    addFormElement("text", textF);
    addSubmitKey("save", "save");
    if (offerCancel) setCancelButton();
  }
View Full Code Here

    this.eList = (List) config.get(COEditController.CONFIG_KEY_EMAILTOADRESSES);
    String emailToAdresses = "";
    if (eList != null) {
      emailToAdresses = StringHelper.formatIdentitesAsEmailToString(eList, "\n");
    }
    teArElEmailToAdresses = new TextAreaElement("message.emailtoadresses", 3, 60, emailToAdresses);
    addFormElement("email", teArElEmailToAdresses);

    String mS = (String) config.get(COEditController.CONFIG_KEY_MSUBJECT_DEFAULT);
    String mSubject = (mS != null) ? mS : "";
    teElSubject = new TextElement("message.subject", mSubject, false, 60, 255);
    addFormElement("mSubject", teElSubject);

    String mB = (String) config.get(COEditController.CONFIG_KEY_MBODY_DEFAULT);
    String mBody = (mB != null) ? mB : "";
    teArElBody = new TextAreaElement("message.body", 8, 60, mBody);
    addFormElement("mBody", teArElBody);

    setSubmitKey("save");
    if (withCancel) setCancelButton();
  }
View Full Code Here

   * @param name
   * @param trans
   */
  public SeparatedValueInputForm(String name, Translator translator) {
    super(name, translator);
    idata = new TextAreaElement("form.step1.sepvalin", 5, 80);
    addFormElement("addsepval", idata);
   
    String[] keys = new String[] {"tab","comma"};
    String[] values = new String[] {translate("form.step1.delimiter.tab"),translate("form.step1.delimiter.comma")};
   
View Full Code Here

TOP

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

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.