示例#1
0
 @Override
 protected void event(final UserRequest ureq, final Controller source, final Event event) {
   if (source == cpContentCtr) { // a .html click within the contentpackage
     if (event instanceof NewInlineUriEvent) {
       final NewInlineUriEvent nue = (NewInlineUriEvent) event;
       // adjust the tree selection to the current choice if found
       selectTreeNode(ureq, nue.getNewUri());
     } else if (event instanceof NewIframeUriEvent) {
       final NewIframeUriEvent nue = (NewIframeUriEvent) event;
       selectTreeNode(ureq, nue.getNewUri());
     } // else ignore (e.g. misplaced olatcmd event (inner olat link found in a
     // contentpackaging file)
   }
 }
示例#2
0
 @Override
 protected void event(final UserRequest ureq, final Component source, final Event event) {
   if (source == cpTree) {
     // FIXME:fj: cleanup between MenuTree.COMMAND_TREENODE_CLICKED and
     // TreeEvent.dito...
     if (event.getCommand().equals(MenuTree.COMMAND_TREENODE_CLICKED)) {
       final TreeEvent te = (TreeEvent) event;
       switchToPage(ureq, te);
     }
   } else if (source == cpComponent) {
     if (event instanceof NewInlineUriEvent) {
       final NewInlineUriEvent nue = (NewInlineUriEvent) event;
       // adjust the tree selection to the current choice if found
       selectTreeNode(ureq, nue.getNewUri());
     }
   }
 }