@Override
protected void event(UserRequest ureq, Component source, Event event) {
if (source == olatMenuTree) {
if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
// process menu commands
TreeNode selTreeNode = olatMenuTree.getSelectedNode();
// cleanup old content controller (never null)
removeAsListenerAndDispose(contentCtr);
// create new content controller
// Following cases:
// 1a) Simple Action Extension using only ureq and windowControl -> handled by default implementation of createController
// 1b) Specialised Action Extension which needs some more internals -> handled by the class extending GenericMainController, by overwriting createController
// 2) uobject is something special which needs evaluation by class extending GenericMainController
Object uobject = selTreeNode.getUserObject();
contentCtr = getContentCtr(uobject, ureq);
listenTo(contentCtr);
Component resComp = contentCtr.getInitialComponent();
content.setContent(resComp);
} else { // the action was not allowed anymore