Search in sources :

Example 1 with EmptyChosenEvent

use of org.olat.core.gui.control.generic.ajax.autocompletion.EmptyChosenEvent in project OpenOLAT by OpenOLAT.

the class TableController method event.

@Override
public void event(final UserRequest ureq, final Controller source, final Event event) {
    log.debug("dispatchEvent event=" + event + "  source=" + source);
    if (event instanceof EntriesChosenEvent) {
        EntriesChosenEvent ece = (EntriesChosenEvent) event;
        List<String> filterList = ece.getEntries();
        if (!filterList.isEmpty()) {
            table.setSearchString(filterList.get(0));
            modelChanged(false);
        } else {
            // reset filter search filter in modelChanged
            modelChanged();
        }
    } else if (event instanceof EmptyChosenEvent) {
        modelChanged(true);
    }
}
Also used : EmptyChosenEvent(org.olat.core.gui.control.generic.ajax.autocompletion.EmptyChosenEvent) EntriesChosenEvent(org.olat.core.gui.control.generic.ajax.autocompletion.EntriesChosenEvent)

Example 2 with EmptyChosenEvent

use of org.olat.core.gui.control.generic.ajax.autocompletion.EmptyChosenEvent in project openolat by klemens.

the class TableController method event.

@Override
public void event(final UserRequest ureq, final Controller source, final Event event) {
    log.debug("dispatchEvent event=" + event + "  source=" + source);
    if (event instanceof EntriesChosenEvent) {
        EntriesChosenEvent ece = (EntriesChosenEvent) event;
        List<String> filterList = ece.getEntries();
        if (!filterList.isEmpty()) {
            table.setSearchString(filterList.get(0));
            modelChanged(false);
        } else {
            // reset filter search filter in modelChanged
            modelChanged();
        }
    } else if (event instanceof EmptyChosenEvent) {
        modelChanged(true);
    }
}
Also used : EmptyChosenEvent(org.olat.core.gui.control.generic.ajax.autocompletion.EmptyChosenEvent) EntriesChosenEvent(org.olat.core.gui.control.generic.ajax.autocompletion.EntriesChosenEvent)

Aggregations

EmptyChosenEvent (org.olat.core.gui.control.generic.ajax.autocompletion.EmptyChosenEvent)2 EntriesChosenEvent (org.olat.core.gui.control.generic.ajax.autocompletion.EntriesChosenEvent)2