on 07-05-2007 6:21 PM
Hi, SDN Fellows.
I am doing a relative navigation from one Web Dynpro iView to another Web Dynpro iView, the code as following:
String [] path = {"workset1","pageB"};
String baseurl = "ROLES://portal_content/folder1/folder2/worktset1/pageA";
WDPortalNavigation.navigateRelative(baseurl,2,path,"",WDPortalNavigationMode.SHOW_INPLACE,(String)"",(String)"",WDPortalNavigationHistoryMode.ALLOW_DUPLICATIONS,"MyPageA","","MyParameter=paraA");
My problem is at the baseurl, as I don't want to hard code the baseurl path at the Web Dynpro application, as these two pages can be assigned to different roles.
So, what I want to do is to write a line of code to get the current Web Dynpro iview pcd url, say: "pcd:portal_content/folder1/folder2/worktset1/pageA", then replace the "pcd:" to "ROLES://" to form the right iview role url parameter.
I can do this every easily with the EPCF framework if using JSPDynpage (but now Web Dynpro does not support Java Script), as following:
parent.pageSupport.getIvuId(self);
I believe I can achieve the same thing with the Page Builder API or something like PCD Service in Web Dynpro too.
Can anyone advise me how to achieve this?
Thanks.
Kent
Hi Kent,
Add the following parameter to your Web Dynpro iview (Under 'Application parameters'):
iViewPath=<IView.ID>
Add the following code:
iViewPath = WDWebContextAdapter.getWebContextAdapter().getRequestParameter("iViewPath");
Now, iViewPath will contain 'pcd://portal_content....'
Regards,
Omri
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Omri.
I have looked at this method, it is an alternative to solve my current problem. But there is some inflexibility since I have to manually add the parameter of the IvIew path. Meaning, eveytimes the Sytem Administer change the name, he has to go to edit the parameter of iView path.
My ideal solution (if exist) is to programmatically getting the iView path (like I described using the EPCF framework).
But I will implement your suggestion for the time being. Hope that I can have the solution that I desired later.
Thanks a lot.
Kent
Hi Kent,
I think you misunderstood (-:
<IView.ID> is a "built in" parameter in the portal, meaning, this is exactly what you need to write in the application parameter (you don't write the path itself - hard coded).
Say you have 2 Web Dynpro iviews:
1) portal content/my role/wd1
2) portal content/my role/my workspace/wd2
Both iviews have the SAME parameter iViewPath=<IView.ID>
The parameter is dynamic so you'll get the CORRECT path each time.
The administrator needs to make sure that the parameter is exist, he doesn't need to change it!
Regards,
Omri
Omri,
I have done the exact same thing, but it is giving me an null value for the iViewPath.
I have added this string:
iViewPath=<IView.ID>
in the Parameters to Pass from the Page Request (for URL Isolation) property of Web Dynpro iView.
And in my Web Dynpro apllication, I put this code in my init() method:
iViewPath= WDWebContextAdapter.getWebContextAdapter().getRequestParameter("iViewPath");
Please advise.
Kent
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent,
The best way to do navigation is definitely to use object based navigation. I would recommend that you follow this approach because you wont need to hard code the PCD path in your code. This is definitely the way to go. With OBN you create objects like Order and Order Detail, and you navigate to those. You use the administrator to set the relationship between these objects and the actual pages etc on which they are shown. A much more maintainable approach
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kent,
Find the url's which can help u.
<a href="http://help.sap.com/saphelp_nw04s/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/content.htm">http://help.sap.com/saphelp_nw04s/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/content.htm</a>
<a href="https://help.sap.com/javadocs/NW04S/SPS09/pc/com/sapportals/portal/pcd/gl/doc-files/ProgrammingExamples.html">https://help.sap.com/javadocs/NW04S/SPS09/pc/com/sapportals/portal/pcd/gl/doc-files/ProgrammingExamples.html</a>
regards
Sumit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Check the following links,
http://help.sap.com/saphelp_nw04/helpdata/en/4b/9b3a3e5069eb6ce10000000a114084/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/62/b3dc4281de2878e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw70/helpdata/en/43/0174a642406db7e10000000a422035/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.