Search in sources :

Example 26 with FlexiTableSearchEvent

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

the class IdentityListCourseNodeController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            AssessedIdentityElementRow row = usersTableModel.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                doSelect(ureq, row);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            loadModel(ureq);
        }
    } else if (bulkDoneButton == source) {
        doSetDone(ureq);
    } else if (bulkVisibleButton == source) {
        doConfirmVisible(ureq);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        if ("tools".equals(link.getCmd())) {
            doOpenTools(ureq, (AssessedIdentityElementRow) link.getUserObject(), link);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : AssessedIdentityElementRow(org.olat.modules.assessment.ui.AssessedIdentityElementRow) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 27 with FlexiTableSearchEvent

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

the class AbstractMemberListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == membersTable) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            MemberView row = memberListModel.getObject(se.getIndex());
            if (TABLE_ACTION_IM.equals(cmd)) {
                doIm(ureq, row);
            } else if (TABLE_ACTION_EDIT.equals(cmd)) {
                openEdit(ureq, row);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            String cmd = event.getCommand();
            if (FlexiTableSearchEvent.SEARCH.equals(event.getCommand())) {
                FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
                String search = se.getSearch();
                doSearch(search);
            } else if (FlexiTableSearchEvent.QUICK_SEARCH.equals(event.getCommand())) {
                FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
                String search = se.getSearch();
                doSearch(search);
            } else if (FlexiTableSearchEvent.RESET.getCommand().equals(cmd)) {
                doResetSearch();
            }
        }
    } else if (editButton == source) {
        List<MemberView> selectedItems = getMultiSelectedRows();
        openEdit(ureq, selectedItems);
    } else if (mailButton == source) {
        List<MemberView> selectedItems = getMultiSelectedRows();
        doSendMail(ureq, selectedItems);
    } else if (removeButton == source) {
        List<MemberView> selectedItems = getMultiSelectedRows();
        confirmDelete(ureq, selectedItems);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("tools".equals(cmd)) {
            MemberView row = (MemberView) link.getUserObject();
            doOpenTools(ureq, row, link);
        } else if ("im".equals(cmd)) {
            MemberView row = (MemberView) link.getUserObject();
            doIm(ureq, row);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) ContactList(org.olat.core.util.mail.ContactList) List(java.util.List) ArrayList(java.util.ArrayList) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 28 with FlexiTableSearchEvent

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

the class StudentListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            StudentStatEntry selectedRow = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                selectStudent(ureq, selectedRow);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            FlexiTableSearchEvent ftse = (FlexiTableSearchEvent) event;
            String searchString = ftse.getSearch();
            model.search(searchString);
            tableEl.reset();
            tableEl.reloadData();
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) StudentStatEntry(org.olat.modules.coach.model.StudentStatEntry)

Aggregations

FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)28 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)28 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)18 Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)8 ArrayList (java.util.ArrayList)4 List (java.util.List)4 SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)2 RatingFormEvent (org.olat.core.gui.components.rating.RatingFormEvent)2 RatingWithAverageFormItem (org.olat.core.gui.components.rating.RatingWithAverageFormItem)2 ContactList (org.olat.core.util.mail.ContactList)2 BusinessGroup (org.olat.group.BusinessGroup)2 BusinessGroupRef (org.olat.group.BusinessGroupRef)2 BusinessGroupShort (org.olat.group.BusinessGroupShort)2 BusinessGroupRow (org.olat.group.model.BusinessGroupRow)2 BusinessGroupSelectionEvent (org.olat.group.model.BusinessGroupSelectionEvent)2 BGConfigBusinessGroup (org.olat.group.ui.wizard.BGConfigBusinessGroup)2 BGCopyBusinessGroup (org.olat.group.ui.wizard.BGCopyBusinessGroup)2 AssessedIdentityElementRow (org.olat.modules.assessment.ui.AssessedIdentityElementRow)2 StudentStatEntry (org.olat.modules.coach.model.StudentStatEntry)2 MySharedItemRow (org.olat.modules.portfolio.model.MySharedItemRow)2