Search in sources :

Example 36 with SelectionEvent

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

the class GoToRecordingsController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            if ("select".equals(se.getCommand())) {
                GoToRecordingsG2T recording = tableModel.getObject(se.getIndex());
                doView(ureq, recording);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) GoToRecordingsG2T(org.olat.modules.gotomeeting.model.GoToRecordingsG2T)

Example 37 with SelectionEvent

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

the class DialogElementListController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            DialogElementRow row = tableModel.getObject(se.getIndex());
            if ("forum".equals(se.getCommand())) {
                fireEvent(ureq, new SelectRowEvent(row));
            } else if ("delete".equals(se.getCommand())) {
                doConfirmDelete(ureq, row);
            }
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("download".equals(cmd)) {
            doFileDelivery(ureq, (DialogElement) link.getUserObject());
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) DialogElement(org.olat.course.nodes.dialog.DialogElement) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 38 with SelectionEvent

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

the class TeacherRollCallController 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();
            TeacherRollCallRow row = tableModel.getObject(se.getIndex());
            if ("all".equals(cmd)) {
                doCheckAllRow(row);
            }
        }
    } else if (source instanceof MultipleSelectionElement) {
        MultipleSelectionElement check = (MultipleSelectionElement) source;
        TeacherRollCallRow row = (TeacherRollCallRow) check.getUserObject();
        if (row.getAuthorizedAbsence() == check) {
            doAuthorizedAbsence(row, check);
            if (check.isAtLeastSelected(1)) {
                doCalloutReasonAbsence(ureq, check.getFormDispatchId() + "_C_0", row);
            }
        } else {
            doCheckRow(row, check);
        }
    } else if (reopenButton == source) {
        doReopen(ureq);
    } else if (closeLectureBlocksButton == source) {
        if (validateFormLogic(ureq)) {
            saveLectureBlocks();
            doConfirmCloseLectureBlock(ureq);
        }
    } else if (cancelLectureBlockButton == source) {
        saveLectureBlocks();
        doConfirmCancelLectureBlock(ureq);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if (cmd != null && cmd.startsWith("abs_reason_")) {
            TeacherRollCallRow row = (TeacherRollCallRow) link.getUserObject();
            doCalloutReasonAbsence(ureq, link.getFormDispatchId(), row);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : MultipleSelectionElement(org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 39 with SelectionEvent

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

the class LecturesListController 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();
            if ("open.course".equals(cmd)) {
                LectureBlockIdentityStatistics row = tableModel.getObject(se.getIndex());
                doOpenCourseLectures(ureq, row);
            }
        }
    } else if (source == exportButton) {
        doExportStatistics(ureq);
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) LectureBlockIdentityStatistics(org.olat.modules.lecture.model.LectureBlockIdentityStatistics)

Example 40 with SelectionEvent

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

the class LifecycleAdminController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == createLifeCycle) {
        doEdit(ureq, null);
    } else if (source == tableEl) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            if ("delete-lifecycle".equals(se.getCommand())) {
                RepositoryEntryLifecycle row = model.getObject(se.getIndex());
                doConfirmDelete(ureq, row);
            } else if ("edit-lifecycle".equals(se.getCommand())) {
                RepositoryEntryLifecycle row = model.getObject(se.getIndex());
                doEdit(ureq, row);
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : RepositoryEntryLifecycle(org.olat.repository.model.RepositoryEntryLifecycle) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)

Aggregations

SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)170 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)54 FlexiTableSearchEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableSearchEvent)28 ArrayList (java.util.ArrayList)14 List (java.util.List)14 Activateable2 (org.olat.core.gui.control.generic.dtabs.Activateable2)10 MultipleSelectionElement (org.olat.core.gui.components.form.flexible.elements.MultipleSelectionElement)6 SingleSelection (org.olat.core.gui.components.form.flexible.elements.SingleSelection)6 FlexiTableRenderEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableRenderEvent)6 Identity (org.olat.core.id.Identity)6 CourseNode (org.olat.course.nodes.CourseNode)6 EfficiencyStatementEntry (org.olat.modules.coach.model.EfficiencyStatementEntry)6 GoToMeeting (org.olat.modules.gotomeeting.GoToMeeting)5 PortfolioElementRow (org.olat.modules.portfolio.ui.model.PortfolioElementRow)5 Set (java.util.Set)4 AssessmentNodeData (org.olat.course.assessment.model.AssessmentNodeData)4 Checkbox (org.olat.course.nodes.cl.model.Checkbox)4 SentReminderRow (org.olat.course.reminder.model.SentReminderRow)4 UserSelectionEvent (org.olat.modules.assessment.ui.event.UserSelectionEvent)4 Pool (org.olat.modules.qpool.Pool)4