cancel
Showing results for 
Search instead for 
Did you mean: 

In WebDynpro modal popup window background window is accessible

Former Member
0 Kudos

Hi,

I have created a popup window using modal windowinfo.

Popup appears properly, however the window in background of popup is still accessible. The links in background window can be accessed.

I checked with the properties of modal window but could not found any property which restricts control to the popup only. Would appreciate some pointer.

Thanks and Regards,

Sanjeev

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

<b>1..</b>If you intend to display only a confirmatory popup window, then use the code:

(If u want to show a popup confirming sending of email)

String dialogText= "Do u want to send email?";

IWDConfirmationDialog dialog = wdThis.wdGetValueHelp_ApplnController().wdGetAPI().getWindowManager() .createConfirmationWindow(dialogText,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("EH_Yes"),"ok");

dialog.addChoice(wdThis.wdGetAPI().getViewInfo().

getViewController().findInEventHandlers("EH_No"), "NO");

dialog.open();

<i>Here, EH_Yes & EH_No are two event handlers</i> that you need to create.

You can add further functionalities by writing code in these two event handlers, such as closing the window, updating table, etc.

<b>2..</b>But if you want to display popup windows which contain context attributes, UI elements, etc, then you need to embed that view into a window adn then call that window using th following Code:

IWDWindowInfo windowinfo = wdComponentAPI.getComponentInfo().findInWindows("<name of your window>");

IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowinfo,true);

window.setWindowPosition(WDWindowPos.CENTER);

window.setWindowSize(290,300);

wdContext.currentContextElement().setCtx_va_win(window);

window.open();

<i>here ctx_va_win is a context attribute of typetype: com.sap.tc.webdynpro.services.session.api.IWDWindow</i>

<b>In both cases, the window behind will NOT BE ACCESSIBLE

I am using both these pieces of code, and can say for sure that the background window is NOT ACCESSIBLE</b>

I hope this solves your problem

Regards,

Hanoz

sid_sunny
Contributor
0 Kudos

Hi Sanjeev,

I use this code and in my case I am not able to access the background window.

IWDWindowInfo detailWindowInfo = wdComponentAPI.getComponentInfo().findInWindows("DetailViewWindow");

detailWindow = wdComponentAPI.getWindowManager().createModalWindow(detailWindowInfo);

detailWindow.setTitle("Details of "+wdContext.currentTableDataSourceElement().getLoginID());

detailWindow.setWindowPosition(250, 80);

detailWindow.setWindowSize(300, 300);

detailWindow.show();

Regards

Sid

Former Member
0 Kudos

Hello Sid,

Thanks for your reply!

I am using same code to create modal window, however i am able to access background window

Regards,

Sanjeev

abhijeet_mukkawar
Active Contributor
0 Kudos

Hi,

try using:

IWDWindow win = wdComponentAPI.getWindowManager().<b>createWindow</b>(detailWindowInfo,true);

instead of createModalWindow()

hope it helps

regards