use of org.olat.portfolio.ui.artefacts.collect.EPReflexionChangeEvent in project OpenOLAT by OpenOLAT.
the class EPReflexionWrapperController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == reflexionCtrl && event instanceof EPReflexionChangeEvent) {
EPReflexionChangeEvent refEv = (EPReflexionChangeEvent) event;
if (struct != null) {
ePFMgr.setReflexionForArtefactToStructureLink(refEv.getRefArtefact(), struct, refEv.getReflexion());
reflexionBox.deactivate();
fireEvent(ureq, new EPStructureChangeEvent(EPStructureChangeEvent.ADDED, struct));
} else {
AbstractArtefact refArtefact = refEv.getRefArtefact();
refArtefact.setReflexion(refEv.getReflexion());
ePFMgr.updateArtefact(refArtefact);
reflexionBox.deactivate();
fireEvent(ureq, Event.DONE_EVENT);
}
removeAsListenerAndDispose(reflexionBox);
} else if (source == reflexionBox && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
removeAsListenerAndDispose(reflexionBox);
reflexionBox = null;
}
}
use of org.olat.portfolio.ui.artefacts.collect.EPReflexionChangeEvent in project openolat by klemens.
the class EPReflexionWrapperController method event.
/**
* @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.Controller, org.olat.core.gui.control.Event)
*/
@Override
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == reflexionCtrl && event instanceof EPReflexionChangeEvent) {
EPReflexionChangeEvent refEv = (EPReflexionChangeEvent) event;
if (struct != null) {
ePFMgr.setReflexionForArtefactToStructureLink(refEv.getRefArtefact(), struct, refEv.getReflexion());
reflexionBox.deactivate();
fireEvent(ureq, new EPStructureChangeEvent(EPStructureChangeEvent.ADDED, struct));
} else {
AbstractArtefact refArtefact = refEv.getRefArtefact();
refArtefact.setReflexion(refEv.getReflexion());
ePFMgr.updateArtefact(refArtefact);
reflexionBox.deactivate();
fireEvent(ureq, Event.DONE_EVENT);
}
removeAsListenerAndDispose(reflexionBox);
} else if (source == reflexionBox && event == CloseableCalloutWindowController.CLOSE_WINDOW_EVENT) {
removeAsListenerAndDispose(reflexionBox);
reflexionBox = null;
}
}
Aggregations