Java method similar to wpsNavTreeLevel in WP 5.0.2 - Websphere

This is a discussion on Java method similar to wpsNavTreeLevel in WP 5.0.2 - Websphere ; I have managed to get the objectid of the current selected node ModelUtil _modelUtil = ModelUtil.from(request); ContentNode _currentNode = ((NavigationNode)_modelUtil.getNavigationSelection Model().getSelectedNode( )).getContentNode(); _currentNode.getObjectID; Not difficult, the code is copied from one of the jsp-files provided in the Portal. But the ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Java method similar to wpsNavTreeLevel in WP 5.0.2

  1. 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.getNavigationSelection Model().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 the navigation API here http://www-1.ibm.com/support/entdocv...id=swg27004260 The wpsNavTreeLevel is described here http://publib.boulder.ibm.com/pvc/wp...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

  2. Re: Java method similar to wpsNavTreeLevel in WP 5.0.2

    Just to be even more precise, if this had been possible I would have had no problem

    stopLevel="<%= wpsNavTreeLevel + 1%>">



    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

  3. Re: Java method similar to wpsNavTreeLevel in WP 5.0.2

    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



    where level is an Integer like wpsNavTreeLevel, but available for all jsp-files.

    R.
    **************************************************
    Rune Hellem http://hellem.org

+ Reply to Thread