use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project OpenOLAT by OpenOLAT.
the class FormUIFactory method addTextElement.
/**
* @param id The unique identifier of this text element (can be null)
* @param name
* @param maxLen
* @param initialValue
* @param i18nLabel
* @param formLayout
* @return
*/
public TextElement addTextElement(String id, String name, final String i18nLabel, final int maxLen, String initialValue, FormItemContainer formLayout) {
String val = initialValue == null ? "" : initialValue;
TextElement te = new TextElementImpl(id, name, val);
te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
setLabelIfNotNull(i18nLabel, te);
te.setMaxLength(maxLen);
formLayout.add(te);
return te;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project openolat by klemens.
the class FormUIFactory method addTextElement.
/**
* @param id The unique identifier of this text element (can be null)
* @param name
* @param maxLen
* @param initialValue
* @param i18nLabel
* @param formLayout
* @return
*/
public TextElement addTextElement(String id, String name, final String i18nLabel, final int maxLen, String initialValue, FormItemContainer formLayout) {
String val = initialValue == null ? "" : initialValue;
TextElement te = new TextElementImpl(id, name, val);
te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
setLabelIfNotNull(i18nLabel, te);
te.setMaxLength(maxLen);
formLayout.add(te);
return te;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project openolat by klemens.
the class FormUIFactory method addPasswordElement.
public TextElement addPasswordElement(String id, String name, final String i18nLabel, final int maxLen, String initialValue, FormItemContainer formLayout) {
TextElement te = new TextElementImpl(id, name, initialValue, TextElementImpl.HTML_INPUT_TYPE_PASSWORD);
te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
setLabelIfNotNull(i18nLabel, te);
te.setMaxLength(maxLen);
formLayout.add(te);
return te;
}
Aggregations