Search in sources :

Example 1 with SelectIdentityEvent

use of org.olat.course.nodes.gta.ui.events.SelectIdentityEvent in project openolat by klemens.

the class GTACoachedParticipantListController 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();
            CoachedIdentityRow row = tableModel.getObject(se.getIndex());
            if ("duedates".equals(cmd)) {
                doEditDueDate(ureq, row);
            } else if (StringHelper.containsNonWhitespace(cmd)) {
                fireEvent(ureq, new SelectIdentityEvent(row.getIdentity().getIdentityKey()));
            }
        }
    } else if (extendButton == source) {
        List<CoachedIdentityRow> rows = getSelectedRows();
        doEditMultipleDueDates(ureq, rows);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("mark".equals(cmd)) {
            Long assessableIdentityKey = (Long) link.getUserObject();
            boolean marked = doToogleMark(ureq, assessableIdentityKey);
            link.setIconLeftCSS(marked ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);
            link.getComponent().setDirty(true);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectIdentityEvent(org.olat.course.nodes.gta.ui.events.SelectIdentityEvent) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) List(java.util.List) ArrayList(java.util.ArrayList) TaskList(org.olat.course.nodes.gta.TaskList) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 2 with SelectIdentityEvent

use of org.olat.course.nodes.gta.ui.events.SelectIdentityEvent in project OpenOLAT by OpenOLAT.

the class GTACoachedParticipantListController 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();
            CoachedIdentityRow row = tableModel.getObject(se.getIndex());
            if ("duedates".equals(cmd)) {
                doEditDueDate(ureq, row);
            } else if (StringHelper.containsNonWhitespace(cmd)) {
                fireEvent(ureq, new SelectIdentityEvent(row.getIdentity().getIdentityKey()));
            }
        }
    } else if (extendButton == source) {
        List<CoachedIdentityRow> rows = getSelectedRows();
        doEditMultipleDueDates(ureq, rows);
    } else if (source instanceof FormLink) {
        FormLink link = (FormLink) source;
        String cmd = link.getCmd();
        if ("mark".equals(cmd)) {
            Long assessableIdentityKey = (Long) link.getUserObject();
            boolean marked = doToogleMark(ureq, assessableIdentityKey);
            link.setIconLeftCSS(marked ? Mark.MARK_CSS_LARGE : Mark.MARK_ADD_CSS_LARGE);
            link.getComponent().setDirty(true);
        }
    }
    super.formInnerEvent(ureq, source, event);
}
Also used : SelectIdentityEvent(org.olat.course.nodes.gta.ui.events.SelectIdentityEvent) SelectionEvent(org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent) List(java.util.List) ArrayList(java.util.ArrayList) TaskList(org.olat.course.nodes.gta.TaskList) FormLink(org.olat.core.gui.components.form.flexible.elements.FormLink)

Example 3 with SelectIdentityEvent

use of org.olat.course.nodes.gta.ui.events.SelectIdentityEvent in project OpenOLAT by OpenOLAT.

the class GTACoachSelectionController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (groupListCtrl == source) {
        if (event instanceof SelectBusinessGroupEvent) {
            SelectBusinessGroupEvent selectEvent = (SelectBusinessGroupEvent) event;
            doSelectBusinessGroup(ureq, selectEvent.getBusinessGroup());
            backLink.setVisible(true);
        }
    } else if (participantListCtrl == source) {
        if (event instanceof SelectIdentityEvent) {
            SelectIdentityEvent selectEvent = (SelectIdentityEvent) event;
            Identity selectedIdentity = securityManager.loadIdentityByKey(selectEvent.getIdentityKey());
            doSelectParticipant(ureq, selectedIdentity);
            backLink.setVisible(true);
        }
    }
    super.event(ureq, source, event);
}
Also used : SelectIdentityEvent(org.olat.course.nodes.gta.ui.events.SelectIdentityEvent) SelectBusinessGroupEvent(org.olat.course.nodes.gta.ui.events.SelectBusinessGroupEvent) Identity(org.olat.core.id.Identity)

Example 4 with SelectIdentityEvent

use of org.olat.course.nodes.gta.ui.events.SelectIdentityEvent in project openolat by klemens.

the class GTACoachSelectionController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (groupListCtrl == source) {
        if (event instanceof SelectBusinessGroupEvent) {
            SelectBusinessGroupEvent selectEvent = (SelectBusinessGroupEvent) event;
            doSelectBusinessGroup(ureq, selectEvent.getBusinessGroup());
            backLink.setVisible(true);
        }
    } else if (participantListCtrl == source) {
        if (event instanceof SelectIdentityEvent) {
            SelectIdentityEvent selectEvent = (SelectIdentityEvent) event;
            Identity selectedIdentity = securityManager.loadIdentityByKey(selectEvent.getIdentityKey());
            doSelectParticipant(ureq, selectedIdentity);
            backLink.setVisible(true);
        }
    }
    super.event(ureq, source, event);
}
Also used : SelectIdentityEvent(org.olat.course.nodes.gta.ui.events.SelectIdentityEvent) SelectBusinessGroupEvent(org.olat.course.nodes.gta.ui.events.SelectBusinessGroupEvent) Identity(org.olat.core.id.Identity)

Aggregations

SelectIdentityEvent (org.olat.course.nodes.gta.ui.events.SelectIdentityEvent)4 ArrayList (java.util.ArrayList)2 List (java.util.List)2 FormLink (org.olat.core.gui.components.form.flexible.elements.FormLink)2 SelectionEvent (org.olat.core.gui.components.form.flexible.impl.elements.table.SelectionEvent)2 Identity (org.olat.core.id.Identity)2 TaskList (org.olat.course.nodes.gta.TaskList)2 SelectBusinessGroupEvent (org.olat.course.nodes.gta.ui.events.SelectBusinessGroupEvent)2