Search in sources :

Example 1 with TextElementImpl

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;
}
Also used : RichTextElement(org.olat.core.gui.components.form.flexible.elements.RichTextElement) StaticTextElement(org.olat.core.gui.components.form.flexible.elements.StaticTextElement) TextElement(org.olat.core.gui.components.form.flexible.elements.TextElement) RichTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.richText.RichTextElementImpl) StaticTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.StaticTextElementImpl) TextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl)

Example 2 with TextElementImpl

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;
    }
}
Also used : TextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl) FormLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.FormLinkImpl)

Example 3 with TextElementImpl

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;
}
Also used : RichTextElement(org.olat.core.gui.components.form.flexible.elements.RichTextElement) StaticTextElement(org.olat.core.gui.components.form.flexible.elements.StaticTextElement) TextElement(org.olat.core.gui.components.form.flexible.elements.TextElement) RichTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.richText.RichTextElementImpl) StaticTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.StaticTextElementImpl) TextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl)

Example 4 with TextElementImpl

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;
    }
}
Also used : TextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl) FormLinkImpl(org.olat.core.gui.components.form.flexible.impl.elements.FormLinkImpl)

Example 5 with TextElementImpl

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;
}
Also used : RichTextElement(org.olat.core.gui.components.form.flexible.elements.RichTextElement) StaticTextElement(org.olat.core.gui.components.form.flexible.elements.StaticTextElement) TextElement(org.olat.core.gui.components.form.flexible.elements.TextElement) RichTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.richText.RichTextElementImpl) StaticTextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.StaticTextElementImpl) TextElementImpl(org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl)

Aggregations

TextElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.TextElementImpl)8 RichTextElement (org.olat.core.gui.components.form.flexible.elements.RichTextElement)6 StaticTextElement (org.olat.core.gui.components.form.flexible.elements.StaticTextElement)6 TextElement (org.olat.core.gui.components.form.flexible.elements.TextElement)6 StaticTextElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.StaticTextElementImpl)6 RichTextElementImpl (org.olat.core.gui.components.form.flexible.impl.elements.richText.RichTextElementImpl)6 FormLinkImpl (org.olat.core.gui.components.form.flexible.impl.elements.FormLinkImpl)2