Search in sources :

Example 6 with DeleteBinderEvent

use of org.olat.modules.portfolio.ui.event.DeleteBinderEvent in project openolat by klemens.

the class BinderController method event.

@Override
protected void event(UserRequest ureq, Controller source, Event event) {
    if (entriesCtrl == source) {
        if (event == Event.CHANGED_EVENT) {
            if (overviewCtrl != null) {
                overviewCtrl.loadModel();
            }
        }
    } else if (overviewCtrl == source) {
        if (event == Event.CHANGED_EVENT) {
            removeAsListenerAndDispose(entriesCtrl);
            entriesCtrl = null;
            binder = portfolioService.getBinderByKey(binder.getKey());
        } else if (event instanceof SectionSelectionEvent) {
            SectionSelectionEvent sse = (SectionSelectionEvent) event;
            List<ContextEntry> entries = new ArrayList<>();
            entries.add(BusinessControlFactory.getInstance().createContextEntry(OresHelper.createOLATResourceableInstance("Section", sse.getSection().getKey())));
            doOpenEntries(ureq).activate(ureq, entries, null);
        } else if (event instanceof DeleteBinderEvent || event instanceof RestoreBinderEvent) {
            fireEvent(ureq, event);
        }
    }
}
Also used : DeleteBinderEvent(org.olat.modules.portfolio.ui.event.DeleteBinderEvent) ArrayList(java.util.ArrayList) SectionSelectionEvent(org.olat.modules.portfolio.ui.event.SectionSelectionEvent) RestoreBinderEvent(org.olat.modules.portfolio.ui.event.RestoreBinderEvent) ContextEntry(org.olat.core.id.context.ContextEntry)

Aggregations

DeleteBinderEvent (org.olat.modules.portfolio.ui.event.DeleteBinderEvent)6 RestoreBinderEvent (org.olat.modules.portfolio.ui.event.RestoreBinderEvent)4 ArrayList (java.util.ArrayList)2 ContextEntry (org.olat.core.id.context.ContextEntry)2 NewBinderEvent (org.olat.modules.portfolio.ui.event.NewBinderEvent)2 PageDeletedEvent (org.olat.modules.portfolio.ui.event.PageDeletedEvent)2 PageRemovedEvent (org.olat.modules.portfolio.ui.event.PageRemovedEvent)2 SectionSelectionEvent (org.olat.modules.portfolio.ui.event.SectionSelectionEvent)2 CourseTemplateRow (org.olat.modules.portfolio.ui.model.CourseTemplateRow)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2