Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Get portal node of current web dynpro application

Hello experts,

I have a requirement to identify the logged on user's role of the web dynpro application, then show different contents to them, e.g. different contents to requestor and approver.

We can use the API "WDClientUser.forceLoggedInClientUser().getSAPUser().getParentGroups(true)" to get user's portal roles but the problem is one user may have both requestor and approver roles assigned. So we need to get the portal node which this web dynpro application is positioned. i.e. did he click "Request Page" or "Approval Page" to launch the web dynpro application.

Thread Get current portal role that the application running underneath suggests using sharing reference of portal services. But we're now using CE7.1 EhP1 and sharing reference is deprecated. Anyone knows what else we can do to get the portal nodes?

Thank you


Former Member

Hi James,

the code given bellow gives you the current clicked role,ir the role u have clicked on currently

IWDNavigationHelperService wdNavHelperService =

(IWDNavigationHelperService) WDPortalUtils.getService(IWDNavigationHelperService.KEY);

INavigationNode navigationNode = wdNavHelperService.getCurrentNavNode();

String navNode = navigationNode.getName();

to use this code successfully add

& tc.ep.navigation.api in Component Properties Dependency Tab


Piyas Kumar Das

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question