cancel
Showing results for 
Search instead for 
Did you mean: 

Get portal node of current web dynpro application

Former Member
0 Kudos

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 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

James

Accepted Solutions (1)

Accepted Solutions (1)

former_member182534
Active Participant
0 Kudos

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 com.sap.portal.navigation.sec_help_service.api

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

Regards

Piyas Kumar Das

Former Member
0 Kudos

THanks Piyas. We can add the dependency of com.sap.portal.navigation.sec_help_service.api in NWDS. But cannot find the tc.ep.navigation.api. Do you know which SC contains this API?

James

junwu
Active Contributor
0 Kudos

Hi,

try EP-RUNTIME.

Best regards,

John

Former Member
0 Kudos

Thanks guys. It works using the APIs you listed.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Expers!

My Objective is to develop Web Dynpro and Portal Applications on personal PC for the purpsoe of preparation of for Portal Application Development.

To attain this! I installed the following on Microsoft Virtual PC:

1. SAP Netweaver ABAP Trial Version

2. SAP Developer Studio

I created a Web Dynpro Application and a Hello World Portal Application. When the time came for the deployment, I was asked to give the J2EE Server name. Alas! SAP J2EE Engine was not get installed with the above installation.

And after all this came to my knowledge that SAP NW ABAP trial version is for ABAP.

Now I need to know that what are essential softwares I require to draw up a development environment on my Personal PC.

Please, help me in this regard. I'll be grateful to all.

Regards,

Ramzan

Former Member
0 Kudos

Thanks James,

I have found that our version of Netweaver 7.01 doesnt have these classes, I thinks its only available on CE versions?

Former Member
0 Kudos

Hi James,

Can you please tell me the used DC necessary to use this navigation service? In a Web dynpro DC component in NWDI...Thank you!

Former Member
0 Kudos

Hi Ferguson,

Please add below dependencies:

EP-BASIS-API

com.sap.portal.navigation.sec_help_service.api

EP-RUNTIME

tc.ep.navigation.api

Regards,

James

junwu
Active Contributor
0 Kudos

Hi,

when you create iview/page, you can pass some parameter to your web dynpro application.

For example

page=Request_Page for your Request Page

page=Approval_Page for your Approval Page

in your webdynpro application , you can retrieve that parameter, then you can determine which node you are in.

Best regards,

John

Former Member
0 Kudos

Hi John, thanks for the reply. We will use the iView parameter as the last option. But we're try to find if it is possible to read the node by code without iView changes.