use of org.olat.modules.portfolio.ui.event.SectionSelectionEvent in project OpenOLAT by OpenOLAT.
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);
}
}
}
use of org.olat.modules.portfolio.ui.event.SectionSelectionEvent 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);
}
}
}
Aggregations