use of org.olat.portfolio.ui.filter.PortfolioFilterChangeEvent in project openolat by klemens.
the class EPArtefactPoolRunController 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) {
super.event(ureq, source, event);
if (source == addArtefactCtrl) {
// some artefacts were added, refresh view
if (event.equals(Event.DONE_EVENT)) {
initTPAllView(ureq);
fireEvent(ureq, event);
}
} else if (event instanceof EPArtefactChoosenEvent || event instanceof EPArtefactListChoosenEvent) {
// an artefact was choosen, pass through the event until top
fireEvent(ureq, event);
} else if (source == filterSelectCtrl) {
if (event instanceof PortfolioFilterChangeEvent) {
PortfolioFilterChangeEvent pFEvent = (PortfolioFilterChangeEvent) event;
filterSettings = pFEvent.getFilterList();
} else if (event instanceof PortfolioFilterEditEvent) {
PortfolioFilterEditEvent editEvent = (PortfolioFilterEditEvent) event;
filterSettings = editEvent.getFilterList();
}
if (source instanceof EPFilterSelectController) {
if (event == Event.CHANGED_EVENT) {
initTPFilterView(ureq);
} else if (event instanceof PortfolioFilterChangeEvent) {
// preset search was selected, apply it, but stay within first segment
initTPFilterView(ureq);
initFilterPanel(ureq, Filter.read_only);
} else if (event instanceof PortfolioFilterEditEvent) {
initTPFilterView(ureq);
initFilterPanel(ureq, Filter.extended);
segmentView.select(searchLink);
}
} else if (source instanceof EPTagBrowseController) {
if (event instanceof EPTagBrowseEvent) {
EPTagBrowseEvent found = (EPTagBrowseEvent) event;
initMultiArtefactCtrl(ureq, found.getArtefacts());
setSegmentContent(artCtrl);
}
} else if (source instanceof PortfolioFilterController) {
if (event instanceof PortfolioFilterChangeEvent) {
initTPFilterView(ureq);
}
}
} else if (source == viewModeCtrl && event.getCommand().equals(EPViewModeController.VIEWMODE_CHANGED_EVENT_CMD)) {
initMultiArtefactCtrl(ureq, previousArtefactsList);
setSegmentContent(artCtrl);
} else if (event instanceof EPArtefactDeletedEvent) {
EPArtefactDeletedEvent epDelEv = (EPArtefactDeletedEvent) event;
previousArtefactsList.remove(epDelEv.getArtefact());
initMultiArtefactCtrl(ureq, previousArtefactsList);
setSegmentContent(artCtrl);
}
}
use of org.olat.portfolio.ui.filter.PortfolioFilterChangeEvent in project OpenOLAT by OpenOLAT.
the class EPArtefactPoolRunController 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) {
super.event(ureq, source, event);
if (source == addArtefactCtrl) {
// some artefacts were added, refresh view
if (event.equals(Event.DONE_EVENT)) {
initTPAllView(ureq);
fireEvent(ureq, event);
}
} else if (event instanceof EPArtefactChoosenEvent || event instanceof EPArtefactListChoosenEvent) {
// an artefact was choosen, pass through the event until top
fireEvent(ureq, event);
} else if (source == filterSelectCtrl) {
if (event instanceof PortfolioFilterChangeEvent) {
PortfolioFilterChangeEvent pFEvent = (PortfolioFilterChangeEvent) event;
filterSettings = pFEvent.getFilterList();
} else if (event instanceof PortfolioFilterEditEvent) {
PortfolioFilterEditEvent editEvent = (PortfolioFilterEditEvent) event;
filterSettings = editEvent.getFilterList();
}
if (source instanceof EPFilterSelectController) {
if (event == Event.CHANGED_EVENT) {
initTPFilterView(ureq);
} else if (event instanceof PortfolioFilterChangeEvent) {
// preset search was selected, apply it, but stay within first segment
initTPFilterView(ureq);
initFilterPanel(ureq, Filter.read_only);
} else if (event instanceof PortfolioFilterEditEvent) {
initTPFilterView(ureq);
initFilterPanel(ureq, Filter.extended);
segmentView.select(searchLink);
}
} else if (source instanceof EPTagBrowseController) {
if (event instanceof EPTagBrowseEvent) {
EPTagBrowseEvent found = (EPTagBrowseEvent) event;
initMultiArtefactCtrl(ureq, found.getArtefacts());
setSegmentContent(artCtrl);
}
} else if (source instanceof PortfolioFilterController) {
if (event instanceof PortfolioFilterChangeEvent) {
initTPFilterView(ureq);
}
}
} else if (source == viewModeCtrl && event.getCommand().equals(EPViewModeController.VIEWMODE_CHANGED_EVENT_CMD)) {
initMultiArtefactCtrl(ureq, previousArtefactsList);
setSegmentContent(artCtrl);
} else if (event instanceof EPArtefactDeletedEvent) {
EPArtefactDeletedEvent epDelEv = (EPArtefactDeletedEvent) event;
previousArtefactsList.remove(epDelEv.getArtefact());
initMultiArtefactCtrl(ureq, previousArtefactsList);
setSegmentContent(artCtrl);
}
}
Aggregations