on 07-09-2004 11:37 PM
Hi,
Has anyone been able to access the portal databag object for use in web dynpro succesfully? How is this done?
We tried reading the cookies of the WebContextAdapter request, but it appears that the cookies are only for the local WAS. This doesn't work for the instance where the SP6 portal is running on WAS 6.2 and the webdynpro is running in another WAS. How can this be solved?
I'd like to add to Thomas Lin's solution above...
In order to use the cookie classes, use first need to import "servlet.jar" into your web dynpro project as an external jar. Instructions for this can be found in the following post:
You can then use the following code to access the databag:
//check databag for employee cookie
Cookie[] cookieset = TaskBinder.getCurrentTask().getWebContextAdapter().getHttpServletRequest().getCookies();
for (int i=0;i<cookieset.length;i++) {
if (cookieset<i>.getName().compareTo("urn:com.sap.pct.hcm.orgmanagement:CurrentObject") == 0) {
String dataObject = cookieset<i>.getValue();
foundCookie = true;
break;
}
}
In my example, I was looking for data from the manager self service team viewer and found it in the cookie "urn:com.sap.pct.hcm.orgmanagement:CurrentObject", but the cookie SAPPORTALSDB0 mentioned above was there as well.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Able to get it succesfully with a little hacking around of the portal.
essentially did a
readCookie("SAPPORTALSDB0")
after casting the WDWebContextAdapter object.
This only works if you set your views to use javascript/ cookies.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Tomas,
Unfortunately this is not supported at this point of time. I will put it on the requirement list.
Best regards,
Karin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
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.