Search in sources :

Example 21 with FlexiTableSearchEvent

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

the class AssessedIdentityListController 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) {
            FlexiTableSearchEvent ftse = (FlexiTableSearchEvent) event;
            updateModel(ftse.getSearch(), ftse.getFilters(), ftse.getExtendedFilters());
        }
    }
    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)

Example 22 with FlexiTableSearchEvent

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

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

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

the class SharedPagesController 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();
            SharedPageRow row = model.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                Activateable2 activeateable = doSelectedPage(ureq, row);
                if (activeateable != null) {
                    activeateable.activate(ureq, null, null);
                }
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            FlexiTableSearchEvent se = (FlexiTableSearchEvent) event;
            if (FlexiTableSearchEvent.QUICK_SEARCH.equals(se.getCommand()) || FormEvent.RESET.getCommand().equals(se.getCommand())) {
                loadModel(true, true);
            }
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        if ("mark".equals(link.getCmd())) {
            SharedPageRow row = (SharedPageRow) link.getUserObject();
            toggleBookmark(row);
        }
    }
    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) FlexiTableSearchEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 24 with FlexiTableSearchEvent

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

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

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

the class AuthorListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (addOwnersButton == source) {
        List<AuthoringEntryRow> rows = getMultiSelectedRows();
        if (!rows.isEmpty()) {
            doAddOwners(ureq, rows);
        } else {
            showWarning("bulk.update.nothing.selected");
        }
    } else if (sendMailButton == source) {
        List<AuthoringEntryRow> rows = getMultiSelectedRows();
        if (!rows.isEmpty()) {
            doSendMail(ureq, rows);
        } else {
            showWarning("bulk.update.nothing.selected");
        }
    } else if (copyButton == source) {
        List<AuthoringEntryRow> rows = getMultiSelectedRows();
        if (!rows.isEmpty()) {
            doConfirmCopy(ureq, rows);
        } else {
            showWarning("bulk.update.nothing.selected");
        }
    } else if (deleteButton == source) {
        List<AuthoringEntryRow> rows = getMultiSelectedRows();
        if (!rows.isEmpty()) {
            doDelete(ureq, rows);
        } else {
            showWarning("bulk.update.nothing.selected");
        }
    } else if (closedEl == source) {
        doSetClosedFilter();
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("mark".equals(cmd)) {
            AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
            boolean marked = doMark(ureq, row);
            link.setIconLeftCSS(marked ? "o_icon o_icon_bookmark o_icon-lg" : "o_icon o_icon_bookmark_add o_icon-lg");
            link.setTitle(translate(marked ? "details.bookmark.remove" : "details.bookmark"));
            link.getComponent().setDirty(true);
            row.setMarked(marked);
        } else if ("tools".equals(cmd)) {
            AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
            doOpenTools(ureq, row, link);
        } else if ("references".equals(cmd)) {
            AuthoringEntryRow row = (AuthoringEntryRow) link.getUserObject();
            doOpenReferences(ureq, row, link);
        }
    } else if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            AuthoringEntryRow row = model.getObject(se.getIndex());
            if ("details".equals(cmd)) {
                launchDetails(ureq, row);
            } else if ("edit".equals(cmd)) {
                launchEditor(ureq, row);
            } else if ("select".equals(cmd)) {
                launch(ureq, row);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            AuthorListState stateEntry = new AuthorListState();
            stateEntry.setTableState(tableEl.getStateEntry());
            addToHistory(ureq, stateEntry);
        }
    }
    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) List(java.util.List) ArrayList(java.util.ArrayList) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

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