cancel
Showing results for 
Search instead for 
Did you mean: 

Passing a parameter to an iView window from a Web Dynpro

Former Member
0 Kudos

Hello all,

I know very little about the portal, and haven't been using Web Dynpro for too horribly long, either, so I'm really not sure what part I'm having a problem with here, so I'm just going to explain the whole scenario the best I can.

I have a Web Dynpro DC with two applications in it - SearchDevices and ShowDetail. The idea is that there will be an iView created on the portal for each of these apps, and the user can navigate to the SearchDevices app, but the ShowDetail one will only show up by clicking on a result from the SearchDevices app.

Because the user did not want to see the portal navigation when opening up the ShowDetail, we can't use the WDPortalNavigation.navigateAbsolute(), so it was suggested to me by a coworker that I do the following:

String url = "http://localhost:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fJennifer!2fjava_fe_com_reg~search_cust_device_wdp_com_fecorp_wdp_ed_showdata_ShowData?sap-config-mode=true&application_parameter=EqNo=" + wdContext.currentResultsElement().getEqunr();
String title = "Device Details";
IWDWindow window=wdComponentAPI.getWindowManager().createNonModalExternalWindow(url,title);
window.open();

"http://localhost:50000/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fJennifer!2fjava_fe_com_reg~search_cust_device_wdp_com_fecorp_wdp_ed_showdata_ShowData?sap-config-mode=true" is the url I see when I preview my iView in the portal (it's hard-coded now, but that will be fixed in my final production application)

"EqNo" is the parameter that my ShowDetail app is looking for... but, when I try testing this, this part is obviously not working, as it's always null, even though I can see in the URL the value being passed.

(as a side note, for me to continue testing other things until this is resolved, I HAVE done a WDPortalNavigation.navigateAbsolute() and sent the parameter that way, and it works FINE)

Any suggestions would be appreciated, I <b>will</b> reward points for anything helpful.

Thanks,

Jennifer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

Point 1 : The WD app reads values thru WDWebContextAdapter which do not have access to portal request.. so it cant read from portal url when run in portal.

Point 2 : If you dont want the navigation to be updated.. why cant you make show DC as a usedDC..

use the interface view of the ShowDetail DC and fire a plug inside the code... ?

or create a exit plug.. in the exit plug create a parameter Url and set it to the other WD app s value.. with the parameters.. and fire the exit plug..

Regards

Bharathwaj

Former Member
0 Kudos

1) really? My coworker had a sample app working for him where he passed a parameter like that. Interesting. I never actually saw his code, so I can't verify for sure, but I did see a parameter in the url and then the value of that parameter displayed on the screen, I'll have to follow up with him again.

2) Both apps are in the same DC, so I don't even have to bother with Used DCs... the problem is the user needs to be able to keep the search screen up AND be able to interact with it while the detail screen is open. So, for instance, the user would do a search and there would be 10 results given to him, he can click on three of them and have all three windows open and still go back and modify his search to bring up 2 MORE windows. I didn't know of a way to do modal windows like that within the Web Dynpro using plugs, <i>is</i> there a way?

Former Member
0 Kudos

Hi ,

For the first one ,

Official Doc :

<i>This class allows the access to the origin request. If Web Dynpro is used within the SAP Portal Runtime, the Web Dynpro application developer may use Portal services. For that, the origin request object is often needed to use a lot of the existing Portal services. In the Portal case, the origin request would be a IPortalComponentRequest object.

</i>

If, he has used portal services .. please do post the steps he had done..

Second :

Might sound silly , but what you can do is .. put both of them in the same view.. lilke add interface view of the showdetail in first one itself..

hide when in search page.. .and when a user clicks on a search result.. enable that result.. and disable the other one..

this way.. u hav the same tab in TLN .. and ur passing parameters prob wud also get solved..

Regards

Bharathwaj

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks everyone for all your help... my coworker figured it out for me, he just changed my url from "application_parameter=EqNo=" to "DynamicParameter=EqNo="

Former Member
0 Kudos

Hi,

You can try this out:

In the property sheet for the iview containing the ShowDetail iview, look for a property called "Parameters to be forwarded to Web Dypro". There type in "EqNo". Save and launch your iview.

Regards,

Satyajit.