|
Home > Archive > WebSphere Portal Server > January 2007 > Java method similar to wpsNavTreeLevel in WP 5.0.2
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Java method similar to wpsNavTreeLevel in WP 5.0.2
|
|
|
| I have managed to get the objectid of the current selected node
ModelUtil _modelUtil = ModelUtil.from(request);
ContentNode _currentNode = ((NavigationNode)_modelUtil.getNavigationSelectionModel().getSelectedNode( )).getContentNode();
_currentNode.getObjectID;
Not difficult, the code is copied from one of the jsp-files provided in the Portal. But the one thing I'm not able to figure out is how to get the _currentNode menulevel, equals to wpsNavTreeLevel. I need it to create the menu just as I want it. I found t
he navigation API here http://www-1.ibm.com/support/entdoc...uid=swg27004260 The wpsNavTreeLevel is described here http://publib.boulder.ibm.com/pvc/w...#navigationloop
Since the jsp-tag is able to get the navlevel I would assume that it should be possible to get it via the Java api as well?
Anyone who knows?
Rune
****************************************
**********
Rune Hellem http://hellem.org
| |
|
| Just to be even more precise, if this had been possible I would have had no problem
<wps:navigation startLevel="<%= wpsNavTreeLevel %>"
stopLevel="<%= wpsNavTreeLevel + 1%>">
<wps:navigationLoop>
<!-- Loop at level <%= wpsNavTreeLevel %>-->
But since wpsNavTreeLevel is only accessible inside the wps:navigationLoop I need to do something else, but right now I don't know what...
(and yes - I have to use 5.0.2 :-( .... )
R.
****************************************
**********
Rune Hellem http://hellem.org
| |
|
| I was able to create a workaround at least. I had to do the loop twice, the first time just to get hold of the wpsNavTreeLevel attribute, then I was able to do like this the next time
<wps:navigation stopLevel="<%= level.toString() %>">
where level is an Integer like wpsNavTreeLevel, but available for all jsp-files.
R.
****************************************
**********
Rune Hellem http://hellem.org
|
|
|
|
|