use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleterImpl in project OpenOLAT by OpenOLAT.
the class FormUIFactory method addTextElementWithAutoCompleter.
public AutoCompleter addTextElementWithAutoCompleter(String id, String name, final String i18nLabel, final int maxLen, String initialValue, FormItemContainer formLayout) {
String val = initialValue == null ? "" : initialValue;
AutoCompleterImpl te = new AutoCompleterImpl(id, name);
te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
setLabelIfNotNull(i18nLabel, te);
te.setMaxLength(maxLen);
te.setValue(val);
formLayout.add(te);
return te;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleterImpl in project openolat by klemens.
the class FormUIFactory method addTextElementWithAutoCompleter.
public AutoCompleter addTextElementWithAutoCompleter(String id, String name, final String i18nLabel, final int maxLen, String initialValue, FormItemContainer formLayout) {
String val = initialValue == null ? "" : initialValue;
AutoCompleterImpl te = new AutoCompleterImpl(id, name);
te.setNotLongerThanCheck(maxLen, "text.element.error.notlongerthan");
setLabelIfNotNull(i18nLabel, te);
te.setMaxLength(maxLen);
te.setValue(val);
formLayout.add(te);
return te;
}
use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleterImpl in project openolat by klemens.
the class FlexiTableElementImpl method setSearchEnabled.
@Override
public void setSearchEnabled(ListProvider autoCompleteProvider, UserSession usess) {
searchEnabled = true;
String dispatchId = component.getDispatchID();
searchFieldEl = new AutoCompleterImpl(dispatchId + "_searchField", "search");
searchFieldEl.showLabel(false);
searchFieldEl.getComponent().addListener(this);
((AutoCompleterImpl) searchFieldEl).setListProvider(autoCompleteProvider, usess);
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);
}
use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleterImpl in project OpenOLAT by OpenOLAT.
the class FlexiTableElementImpl method setSearchEnabled.
@Override
public void setSearchEnabled(ListProvider autoCompleteProvider, UserSession usess) {
searchEnabled = true;
String dispatchId = component.getDispatchID();
searchFieldEl = new AutoCompleterImpl(dispatchId + "_searchField", "search");
searchFieldEl.showLabel(false);
searchFieldEl.getComponent().addListener(this);
((AutoCompleterImpl) searchFieldEl).setListProvider(autoCompleteProvider, usess);
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);
}
Aggregations