cancel
Showing results for 
Search instead for 
Did you mean: 

retrieving pages and workset info from Role

Former Member
0 Kudos

Hi,

I was wondering how, if possible, you can retrieve the worksets and pages that belong to a role. I have the role information for a user right now, but I want to know the pages and worksets that are attached to the role.

The reason for all of this is I am dynamically creating a start page, and depending on the role of the user, different information appears within the start page.

I had done this in EP 5.0, but now we are migrating to EP6.0 SR1. I have been surfing through the Javadocs, but have not yet found a clear cut way of finding the information.

If anyone has an answer, it would be appreciated!!

Thanks and best regards,

Kevin

Accepted Solutions (1)

Accepted Solutions (1)

detlev_beutner
Active Contributor
0 Kudos

Hi Kevin,

there are different ways of doing this. The hard way is to retrieve this information directly from the PCD (ugly).

More comfortable is using the NavigationEventsHelperService:

NavigationEventsHelperService navHelperService = (NavigationEventsHelperService)PortalRuntime.getRuntimeResources().getService("com.sap.portal.navigation.helperservice.navigation_events_helper");

Check out this class and it's method (by decompiling).

For instance, you can get the actual NavNode by

INavigationNode navNode = navHelperService.getCurrentLaunchNavNode(request);

From this, you can for example ask for the children or also for the children including the hidden elements and so on.

Hope it helps

Detlev

Former Member
0 Kudos

Hi Detlev,

Thanks for the help. Greatly appreciated. One question though, where do I find the jar file that contains this class? I have added it to the code and it cannot find the class.

Thanks and regards,

Kevin

Former Member
0 Kudos

Hi Kevin,

The class is in the following jar file.

<b>com.sap.portal.navigation.helperserviceapi.jar</b>

Prakash

Answers (0)