use of org.olat.core.gui.components.stack.TooledController in project openolat by klemens.
the class StatisticCourseNodesController method doSelectNode.
private void doSelectNode(UserRequest ureq, TreeNode selectedNode) {
removeAsListenerAndDispose(currentCtrl);
currentCtrl = null;
WindowControl swControl = addToHistory(ureq, OresHelper.createOLATResourceableInstanceWithoutCheck(selectedNode.getIdent(), 0l), null);
if (selectedNode instanceof StatisticResourceNode) {
StatisticResourceNode node = (StatisticResourceNode) selectedNode;
currentCtrl = node.getResult().getController(ureq, swControl, stackPanel, node);
} else {
StatisticResourceNode node = getStatisticNodeInParentLine(selectedNode);
if (node != null) {
currentCtrl = node.getResult().getController(ureq, swControl, stackPanel, selectedNode);
}
}
if (currentCtrl != null) {
listenTo(currentCtrl);
layoutCtr.setCol3(currentCtrl.getInitialComponent());
if (currentCtrl instanceof TooledController) {
((TooledController) currentCtrl).initTools();
}
} else {
layoutCtr.setCol3(new Panel("empty"));
}
// also select in GUI
courseTree.setSelectedNode(selectedNode);
}
use of org.olat.core.gui.components.stack.TooledController in project OpenOLAT by OpenOLAT.
the class StatisticCourseNodesController method doSelectNode.
private void doSelectNode(UserRequest ureq, TreeNode selectedNode) {
removeAsListenerAndDispose(currentCtrl);
currentCtrl = null;
WindowControl swControl = addToHistory(ureq, OresHelper.createOLATResourceableInstanceWithoutCheck(selectedNode.getIdent(), 0l), null);
if (selectedNode instanceof StatisticResourceNode) {
StatisticResourceNode node = (StatisticResourceNode) selectedNode;
currentCtrl = node.getResult().getController(ureq, swControl, stackPanel, node);
} else {
StatisticResourceNode node = getStatisticNodeInParentLine(selectedNode);
if (node != null) {
currentCtrl = node.getResult().getController(ureq, swControl, stackPanel, selectedNode);
}
}
if (currentCtrl != null) {
listenTo(currentCtrl);
layoutCtr.setCol3(currentCtrl.getInitialComponent());
if (currentCtrl instanceof TooledController) {
((TooledController) currentCtrl).initTools();
}
} else {
layoutCtr.setCol3(new Panel("empty"));
}
// also select in GUI
courseTree.setSelectedNode(selectedNode);
}
Aggregations