* @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)
*/
protected void event(UserRequest ureq, Controller source, Event event) {
if (source == treeCtr) {
if (event instanceof TreeNodeClickedEvent) {
TreeNodeClickedEvent clickedEvent = (TreeNodeClickedEvent) event;
// build new entry for this catalog level
CatalogManager cm = CatalogManager.getInstance();
String nodeId = clickedEvent.getNodeId();
Long newParentId = Long.parseLong(nodeId);
CatalogEntry newParent = cm.loadCatalogEntry(newParentId);
// check first if this repo entry is already attached to this new parent
List<CatalogEntry> existingChildren = cm.getChildrenOf(newParent);
for (CatalogEntry existingChild : existingChildren) {