summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Drossel2008-08-21 07:32:23 (EDT)
committerCarsten Drossel2008-08-21 07:32:23 (EDT)
commit7d0f79a89ebb4ba7511242d2b8362a1812da95b8 (patch)
tree61a87e95130e2b0c5ee8ce1820ce624b29c8ee8c
parent59157ad4b0854762c365b61399fce176e3718092 (diff)
downloadorg.eclipse.riena-7d0f79a89ebb4ba7511242d2b8362a1812da95b8.zip
org.eclipse.riena-7d0f79a89ebb4ba7511242d2b8362a1812da95b8.tar.gz
org.eclipse.riena-7d0f79a89ebb4ba7511242d2b8362a1812da95b8.tar.bz2
fixed and applied patch for Bugzilla entry 244575 - add possibility to navigate to a specific node
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java5
-rw-r--r--org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java10
2 files changed, 11 insertions, 4 deletions
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
index 180824f..3e85ad6 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationNode.java
@@ -290,8 +290,9 @@ public abstract class NavigationNode<S extends INavigationNode<C>, C extends INa
return this;
}
for (C child : children) {
- if (child.findNode(nodeId) != null) {
- return child.findNode(nodeId);
+ INavigationNode<?> foundChild = child.findNode(nodeId);
+ if (foundChild != null) {
+ return foundChild;
}
}
return null;
diff --git a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
index 00f1761..7a1c407 100644
--- a/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
+++ b/org.eclipse.riena.navigation/src/org/eclipse/riena/navigation/model/NavigationProcessor.java
@@ -192,8 +192,14 @@ public class NavigationProcessor implements INavigationProcessor, INavigationHis
if (targetNode == null) {
return;
}
- navigationMap.put(targetNode, sourceNode);
- targetNode.activate();
+ INavigationNode<?> activateNode = targetNode.findNode(targetId);
+ if (activateNode != null) {
+ navigationMap.put(activateNode, sourceNode);
+ activateNode.activate();
+ } else {
+ navigationMap.put(targetNode, sourceNode);
+ targetNode.activate();
+ }
}
private INavigationNode<?> provideNode(INavigationNode<?> sourceNode, INavigationNodeId targetId,