* org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
*/
public void event(UserRequest ureq, Component source, Event event) {
if (source == content) {
String action = event.getCommand();
if (action == null) throw new AssertException("no action for a tool command");
// hack check: make sure we only fire clicks that are indeed listed
boolean isInBox = false;
int entCnt = entries.size();
for (int i = 0; i < entCnt; i++) {
ToolEntry entry = (ToolEntry) entries.get(i);
String entryAction = entry.getAction();
if (entryAction != null && entryAction.equals(action)) {
isInBox = true;
break;
}
}
if (!isInBox) throw new AssertException("trying to fire a command which is not in the tool: action=" + action);
// must be links, forward event to controllerlistener(s)
fireEvent(ureq, event);
}
else if (myLinks.contains(source)){
fireEvent(ureq, event);