Search in sources :

Example 41 with SelectionEvent

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

the class VideoAdminTranscodingController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (source == transcodingTable) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            TranscodingRow currentObject = tableModel.getObject(se.getIndex());
            if ("quality.delete".equals(se.getCommand())) {
                queueDeleteTranscoding(currentObject);
                showInfo("delete.transcodings");
            } else if ("quality.transcode".equals(se.getCommand())) {
                queueCreateTranscoding(currentObject);
                showInfo("info.transcoding");
            }
        }
    }
    reloadTable();
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)

Example 42 with SelectionEvent

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

the class TaxonomyTreeTableController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (newLevelButton == source) {
        doNewLevel(ureq);
    } else if (deleteButton == source) {
        doConfirmMultiDelete(ureq);
    } else if (mergeButton == source) {
        doMerge(ureq);
    } else if (typeButton == source) {
        doAssignType(ureq);
    } else if (moveButton == source) {
        doMove(ureq);
    } else if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("select".equals(cmd)) {
                TaxonomyLevelRow row = model.getObject(se.getIndex());
                doSelectTaxonomyLevel(ureq, row);
            }
        } else if (event instanceof FlexiTableSearchEvent) {
            loadModel(true, true);
        }
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("tools".equals(cmd)) {
            TaxonomyLevelRow row = (TaxonomyLevelRow) link.getUserObject();
            doOpenTools(ureq, row, link);
        }
    }
    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) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 43 with SelectionEvent

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

the class TaxonomyLevelTypesEditController method formInnerEvent.

@Override
protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if (addRootTypeButton == source) {
        doAddRootType(ureq);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("tools".equals(cmd)) {
            TaxonomyLevelTypeRow row = (TaxonomyLevelTypeRow) link.getUserObject();
            doOpenTools(ureq, row, link);
        }
    } else if (tableEl == source) {
        if (event instanceof SelectionEvent) {
            SelectionEvent se = (SelectionEvent) event;
            String cmd = se.getCommand();
            if ("edit".equals(cmd)) {
                TaxonomyLevelTypeRow row = model.getObject(se.getIndex());
                doEditLevelType(ureq, row.getType());
            }
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 44 with SelectionEvent

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

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 45 with SelectionEvent

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

the class CorrectionAssessmentItemListController 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();
            CorrectionAssessmentItemRow row = tableModel.getObject(se.getIndex());
            if ("select".equals(cmd)) {
                // accept all
                doSelect(ureq, row, r -> true);
            } else if ("answered".equals(cmd)) {
                // accept all
                doSelect(ureq, row, new ResponsedPredicate(row, true));
            } else if ("notAnswered".equals(cmd)) {
                // accept all
                doSelect(ureq, row, new ResponsedPredicate(row, false));
            } else if ("autoCorrected".equals(cmd)) {
                doSelect(ureq, row, entry -> !row.isManualCorrection() && entry.getManualScore() == null);
            } else if ("corrected".equals(cmd)) {
                doSelect(ureq, row, entry -> entry.getManualScore() != null);
            } else if ("notCorrected".equals(cmd)) {
                doSelect(ureq, row, entry -> row.isManualCorrection() && entry.getManualScore() == null);
            } else if ("toReview".equals(cmd)) {
                doSelect(ureq, row, AssessmentItemListEntry::isToReview);
            }
        }
    } else if (saveTestsButton == source) {
        doConfirmSaveTests(ureq);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        if ("tools".equals(link.getCmd())) {
            doOpenTools(ureq, (CorrectionAssessmentItemRow) link.getUserObject(), link);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : FlexiTableElement(org.olat.core.gui.components.form.flexible.elements.FlexiTableElement) Util(org.olat.core.util.Util) AssessmentItemSession(org.olat.ims.qti21.AssessmentItemSession) ItemSessionKey(org.olat.ims.qti21.ui.assessment.model.ItemSessionKey) DefaultFlexiColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.DefaultFlexiColumnModel) Autowired(org.springframework.beans.factory.annotation.Autowired) AssessmentItemCorrection(org.olat.ims.qti21.ui.assessment.model.AssessmentItemCorrection) OLATResourceable(org.olat.core.id.OLATResourceable) BigDecimal(java.math.BigDecimal) OresHelper(org.olat.core.util.resource.OresHelper) Map(java.util.Map) VelocityContainer(org.olat.core.gui.components.velocity.VelocityContainer) QuestionTypeFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.QuestionTypeFlexiCellRenderer) QTI21Module(org.olat.ims.qti21.QTI21Module) FlexiTableColumnModel(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableColumnModel) CloseableModalController(org.olat.core.gui.control.generic.closablewrapper.CloseableModalController) ManifestMetadataBuilder(org.olat.ims.qti21.model.xml.ManifestMetadataBuilder) Translator(org.olat.core.gui.translator.Translator) Predicate(java.util.function.Predicate) WindowControl(org.olat.core.gui.control.WindowControl) PopEvent(org.olat.core.gui.components.stack.PopEvent) Component(org.olat.core.gui.components.Component) LinkFactory(org.olat.core.gui.components.link.LinkFactory) AssessmentEntryStatus(org.olat.modules.assessment.model.AssessmentEntryStatus) QTI21Service(org.olat.ims.qti21.QTI21Service) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) BasicController(org.olat.core.gui.control.controller.BasicController) CorrectionAssessmentItemRow(org.olat.ims.qti21.ui.assessment.model.CorrectionAssessmentItemRow) List(java.util.List) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink) CorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.CorrectedFlexiCellRenderer) Identity(org.olat.core.id.Identity) AssessmentTestComposerController(org.olat.ims.qti21.ui.editor.AssessmentTestComposerController) CloseableCalloutWindowController(org.olat.core.gui.control.generic.closablewrapper.CloseableCalloutWindowController) TestPlanNode(uk.ac.ed.ph.jqtiplus.state.TestPlanNode) SelectAssessmentItemEvent(org.olat.ims.qti21.ui.assessment.event.SelectAssessmentItemEvent) TooledStackedPanel(org.olat.core.gui.components.stack.TooledStackedPanel) FormEvent(org.olat.core.gui.components.form.flexible.impl.FormEvent) ToReviewFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.ToReviewFlexiCellRenderer) ResolvedAssessmentItem(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentItem) HashMap(java.util.HashMap) ItemSessionState(uk.ac.ed.ph.jqtiplus.state.ItemSessionState) FormItem(org.olat.core.gui.components.form.flexible.FormItem) ResolvedAssessmentTest(uk.ac.ed.ph.jqtiplus.resolution.ResolvedAssessmentTest) ArrayList(java.util.ArrayList) AssessmentTest(uk.ac.ed.ph.jqtiplus.node.test.AssessmentTest) Event(org.olat.core.gui.control.Event) FormBasicController(org.olat.core.gui.components.form.flexible.impl.FormBasicController) FormItemContainer(org.olat.core.gui.components.form.flexible.FormItemContainer) AssessmentItem(uk.ac.ed.ph.jqtiplus.node.item.AssessmentItem) FlexiTableDataModelFactory(org.olat.core.gui.components.form.flexible.impl.elements.table.FlexiTableDataModelFactory) AssessmentTestSession(org.olat.ims.qti21.AssessmentTestSession) CorrectionWorkflow(org.olat.ims.qti21.QTI21Module.CorrectionWorkflow) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry) TestSessionState(uk.ac.ed.ph.jqtiplus.state.TestSessionState) Link(org.olat.core.gui.components.link.Link) AssessmentItemRef(uk.ac.ed.ph.jqtiplus.node.test.AssessmentItemRef) TestPlanNodeKey(uk.ac.ed.ph.jqtiplus.state.TestPlanNodeKey) CompleteAssessmentTestSessionEvent(org.olat.modules.assessment.ui.event.CompleteAssessmentTestSessionEvent) ItemCols(org.olat.ims.qti21.ui.assessment.CorrectionAssessmentItemTableModel.ItemCols) AutoCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.AutoCorrectedFlexiCellRenderer) Controller(org.olat.core.gui.control.Controller) UserManager(org.olat.user.UserManager) NotCorrectedFlexiCellRenderer(org.olat.ims.qti21.ui.assessment.components.NotCorrectedFlexiCellRenderer) LockResult(org.olat.core.util.coordinate.LockResult) UserRequest(org.olat.core.gui.UserRequest) CoordinatorManager(org.olat.core.util.coordinate.CoordinatorManager) CorrectionAssessmentItemRow(org.olat.ims.qti21.ui.assessment.model.CorrectionAssessmentItemRow) AssessmentItemListEntry(org.olat.ims.qti21.ui.assessment.model.AssessmentItemListEntry) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

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