on 04-03-2006 8:24 PM
Can you please let me know how could you retrieve the PCD location of a page dynamically? I need to do this in my webdynpro application.
Hi Aditya,
What version of SAP NetWeaver are you using?
If you can get a hold of PRT services, you can do one of the following:
The IPortalComponentRequest object gives the current PCD location of the component running, which you can use to find the page:
request.getComponentContext().getContextName
Use the navigation helper service (not public but used by some) to find the current node:
NavigationEventsHelperService navHelperService = (NavigationEventsHelperService)PortalRuntime.getRuntimeResources().getService(NavigationEventsHelperService.KEY);
INavigationNode myNode = navHelperService.getCurrentNavNode(request);
I'm not sure all of this is possible within WD iView. If you are on 2004s, you may have additional options.
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am using 2004 not 2004s.
Can you pls explain the 2nd option a bit detail.
In my WD application i am using WDPortalNavigation.navigateAbsolute. To this i need to pass the pcd location of the page. Although i call only one page always, i want to pass this dynamically because when i transport my iviews/pages to QA and Prod i found that the pcdlocation is differing. To hardcode the pcd location path, I couldn't find a way to make sure that pcd location path remains the same across Dev, QA, Production.
if there is a way to ensure that the pcd location path remains same Or to dynamicaly retrieve the pcd location, my problem will be solved.
Yes. It is always the same page i call. I have two iviews A and B. In the A iview i have a button Show document. When i click on this it should load B iview on the same page overwriting the iveiw A. For this i used the above method. Everything works fine except that i have to change the pcd location when i am deploying to Dev, QA and Prod.
Hi,
If you can get a hold of the navigation service, you can cast it into INavigationNamingHandler, which provide a method called composeName, which provides the URL (navigation target) for a node relative to the current node.
See Javadocs at https://media.sdn.sap.com/javadocs/NW04/SPS15/ep/index.html and look at com.sap.portal.navigation.
Daniel
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.