Search in sources :

Example 1 with FlexiTableSearchEvent

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

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 2 with FlexiTableSearchEvent

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

the class AbstractPageListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof FlexiTableSearchEvent) {
            FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
            loadModel(ureq, se.getSearch());
        } else if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("up".equals(cmd)) {
                PortfolioElementRow row = model.getObject(se.getIndex());
                if (row.isPendingAssignment()) {
                    doMoveUpAssignment(ureq, row);
                }
            } else if ("down".equals(cmd)) {
                PortfolioElementRow row = model.getObject(se.getIndex());
                if (row.isPendingAssignment()) {
                    doMoveDownAssignment(ureq, row);
                }
            }
        }
    } else if (timelineSwitchOnButton == source) {
        doSwitchTimelineOff();
    } else if (timelineSwitchOffButton == source) {
        doSwitchTimelineOn();
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("open.full".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doOpenRow(ureq, row, false);
        } else if ("comment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doComment(ureq, row.getPage());
        } else if ("close.section".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doConfirmCloseSection(ureq, row);
        } else if ("reopen.section".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doConfirmReopenSection(ureq, row);
        } else if ("edit.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doEditAssignment(ureq, row);
        } else if ("delete.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doConfirmDeleteAssignment(ureq, row);
        } else if ("move.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doMoveAssignment(ureq, row);
        } else if ("start.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doStartAssignment(ureq, row);
        } else if ("open.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doOpenAssignment(ureq, row);
        } else if ("up.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doMoveUpAssignment(ureq, row);
        } else if ("down.assignment".equals(cmd)) {
            PortfolioElementRow row = (PortfolioElementRow) link.getUserObject();
            doMoveDownAssignment(ureq, row);
        }
    } else if (source instanceof SingleSelection) {
        SingleSelection startAssignment = (SingleSelection) source;
        if (startAssignment.isOneSelected()) {
            String selectedKey = startAssignment.getSelectedKey();
            try {
                Long key = Long.parseLong(selectedKey);
                doStartAssignment(ureq, key);
            } catch (Exception e) {
            // 
            }
        }
    } else if (source == flc) {
        if ("ONCLICK".equals(event.getCommand())) {
            String category = ureq.getParameter("tag_select");
            if (StringHelper.containsNonWhitespace(category)) {
                tableEl.quickSearch(ureq, category);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : PortfolioElementRow(org.olat.modules.portfolio.ui.model.PortfolioElementRow) SingleSelection(org.olat.core.gui.components.form.flexible.elements.SingleSelection) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 3 with FlexiTableSearchEvent

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

the class MediaCenterController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            MediaRow row = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                if (select) {
                    doSelect(ureq, row.getKey());
                } else {
                    Activateable2 activateable = doOpenMedia(ureq, row.getKey());
                    if (activateable != null) {
                        activateable.activate(ureq, null, null);
                    }
                }
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            loadModel();
        }
    } else if (newMediaCallout == source) {
        doOpenNewMediaCallout(ureq, newMediaCallout);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("select".equals(cmd)) {
            MediaRow row = (MediaRow) link.getUserObject();
            if (select) {
                doSelect(ureq, row.getKey());
            } else {
                Activateable2 activateable = doOpenMedia(ureq, row.getKey());
                if (activateable != null) {
                    activateable.activate(ureq, null, null);
                }
            }
        } else if ("tag".equals(cmd)) {
            doToggleCategory(link);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) MediaSelectionEvent(org.olat.modules.portfolio.ui.event.MediaSelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink) MediaRow(org.olat.modules.portfolio.ui.model.MediaRow)

Example 4 with FlexiTableSearchEvent

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

the class MySharedItemsController 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();
            MySharedItemRow row = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                Activateable2 activateable = doSelectBinder(ureq, row);
                if (activateable != null) {
                    activateable.activate(ureq, null, null);
                }
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
            loadModel(se.getSearch());
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : MySharedItemRow(org.olat.modules.portfolio.model.MySharedItemRow) Activateable2(org.olat.core.gui.control.generic.dtabs.Activateable2) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)

Example 5 with FlexiTableSearchEvent

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

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