Search in sources :

Example 1 with AutoCompleteEvent

use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleteEvent in project OpenOLAT by OpenOLAT.

the class FlexiTableElementImpl method dispatchEvent.

@Override
public void dispatchEvent(UserRequest ureq, Component source, Event event) {
    if (source instanceof Choice) {
        if (Choice.EVNT_VALIDATION_OK.equals(event)) {
            Choice visibleColsChoice = (Choice) source;
            setCustomizedColumns(ureq, visibleColsChoice);
        } else if (Choice.EVNT_FORM_RESETED.equals(event)) {
            resetCustomizedColumns(ureq);
        }
        if (callout != null) {
            callout.deactivate();
            callout = null;
        }
    } else if (searchFieldEl.getComponent() == source) {
        if (event instanceof AutoCompleteEvent) {
            AutoCompleteEvent ace = (AutoCompleteEvent) event;
            doSearch(ureq, FlexiTableSearchEvent.QUICK_SEARCH_KEY_SELECTION, ace.getKey(), null);
        }
    }
}
Also used : Choice(org.olat.core.gui.components.choice.Choice) AutoCompleteEvent(org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleteEvent)

Example 2 with AutoCompleteEvent

use of org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleteEvent in project openolat by klemens.

the class FlexiTableElementImpl method dispatchEvent.

@Override
public void dispatchEvent(UserRequest ureq, Component source, Event event) {
    if (source instanceof Choice) {
        if (Choice.EVNT_VALIDATION_OK.equals(event)) {
            Choice visibleColsChoice = (Choice) source;
            setCustomizedColumns(ureq, visibleColsChoice);
        } else if (Choice.EVNT_FORM_RESETED.equals(event)) {
            resetCustomizedColumns(ureq);
        }
        if (callout != null) {
            callout.deactivate();
            callout = null;
        }
    } else if (searchFieldEl.getComponent() == source) {
        if (event instanceof AutoCompleteEvent) {
            AutoCompleteEvent ace = (AutoCompleteEvent) event;
            doSearch(ureq, FlexiTableSearchEvent.QUICK_SEARCH_KEY_SELECTION, ace.getKey(), null);
        }
    }
}
Also used : Choice(org.olat.core.gui.components.choice.Choice) AutoCompleteEvent(org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleteEvent)

Aggregations

Choice (org.olat.core.gui.components.choice.Choice)2 AutoCompleteEvent (org.olat.core.gui.components.form.flexible.impl.elements.AutoCompleteEvent)2