use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project OpenOLAT by OpenOLAT.
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;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project OpenOLAT by OpenOLAT.
the class FlexiTableElementImpl method setSearchEnabled.
@Override
public void setSearchEnabled(boolean enable) {
this.searchEnabled = enable;
if (searchEnabled) {
String dispatchId = component.getDispatchID();
searchFieldEl = new TextElementImpl(dispatchId + "_searchField", "search", "");
searchFieldEl.showLabel(false);
components.put("rSearch", searchFieldEl);
searchButton = new FormLinkImpl(dispatchId + "_searchButton", "rSearchButton", "search", Link.BUTTON);
searchButton.setTranslator(translator);
searchButton.setIconLeftCSS("o_icon o_icon_search");
components.put("rSearchB", searchButton);
rootFormAvailable(searchFieldEl);
rootFormAvailable(searchButton);
} else {
components.remove("rSearch");
components.remove("rSearchB");
searchFieldEl = null;
searchButton = null;
}
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project openolat by klemens.
the class FormUIFactory method addInlineTextElement.
public TextElement addInlineTextElement(String name, String value, FormItemContainer formLayout, FormBasicController listener) {
TextElement ie = new TextElementImpl(null, name, value, TextElementImpl.HTML_INPUT_TYPE_TEXT, true);
ie.addActionListener(FormEvent.ONCLICK);
if (listener != null) {
formLayout.add(ie);
}
return ie;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project openolat by klemens.
the class FlexiTableElementImpl method setSearchEnabled.
@Override
public void setSearchEnabled(boolean enable) {
this.searchEnabled = enable;
if (searchEnabled) {
String dispatchId = component.getDispatchID();
searchFieldEl = new TextElementImpl(dispatchId + "_searchField", "search", "");
searchFieldEl.showLabel(false);
components.put("rSearch", searchFieldEl);
searchButton = new FormLinkImpl(dispatchId + "_searchButton", "rSearchButton", "search", Link.BUTTON);
searchButton.setTranslator(translator);
searchButton.setIconLeftCSS("o_icon o_icon_search");
components.put("rSearchB", searchButton);
rootFormAvailable(searchFieldEl);
rootFormAvailable(searchButton);
} else {
components.remove("rSearch");
components.remove("rSearchB");
searchFieldEl = null;
searchButton = null;
}
}
use of org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl in project OpenOLAT by OpenOLAT.
the class FormUIFactory method addInlineTextElement.
public TextElement addInlineTextElement(String name, String value, FormItemContainer formLayout, FormBasicController listener) {
TextElement ie = new TextElementImpl(null, name, value, TextElementImpl.HTML_INPUT_TYPE_TEXT, true);
ie.addActionListener(FormEvent.ONCLICK);
if (listener != null) {
formLayout.add(ie);
}
return ie;
}
Aggregations