cancel
Showing results for 
Search instead for 
Did you mean: 

How to Create Pop up window and assign values to the table in it

Former Member
0 Kudos

Hi All,

I have a code which checks for duplicate value in the database and displays that duplicate record. I want to put the duplicate record value in a table of a popup window. Can you please tell me how do i acheive this?

I tried the below code for creating a popup but most of the methods used here are deprecated. Please help

IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(

"MyWindowName");

// create the Window

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

window.setWindowPosition(WDWindowPos.CENTER);

window.setTitle("WindowTitle");

// Save WindowInstance in Context

wdContext.currentContextElement.setWindowInstance(window);

// and show the window

window.open();

Regards

Suresh

Accepted Solutions (1)

Accepted Solutions (1)

arun_srinivasan
Contributor
0 Kudos

Hi

Popup Creation steps

1) Create a value attribute of type com.sap.tc.webdynpro.services.session.api.IWDWindow in the main window.

2) Create a value attribute of the same type above in the popup view.

3) Do a context mapping for the attributes.

4) Type the code given below in the event handler from where you want the window to popup.

IWDWindowInfo wininfo = wdComponentAPI.getComponentInfo() .findInWindows(<Popup window name>);

IWDWindow win = wdComponentAPI.getWindowManager().createWindow(wininfo,true);

win.open();

win.setWindowSize(300,100);

win.setWindowPosition(450,400);

wdContext.currentContextElement().set<value attribute name>(win);

5) Type the code given below in the event handler in the popup window from where you want to close the window.

IWDWindow win = wdContext.currentContextElement().get<value attribute name>;

win.destroy();

Hope this helps,

let me know for further

Thanks and Regards,

Arun

Former Member
0 Kudos

Hi Arun,

IWDWindow win = wdComponentAPI.getWindowManager().createWindow(wininfo,true);

win.open();

are depricated.. whats the other way ?? Please let me know

Thanks

Suresh

arun_srinivasan
Contributor
0 Kudos

Hi

Method are deprecated right but it will work when you build and run the project

Try deploy the archive and run the application

Thanks and regards,

Arun

arun_srinivasan
Contributor
0 Kudos

hi

In 2004 s there is a show option to open a popup and hide option hide the pop up

<b>code</b>

IWDWindowInfo wininfo = wdComponentAPI.getComponentInfo().findInWindows("Window2");

IWDWindow win = wdComponentAPI.getWindowManager().createWindow(wininfo,true);

win.show();

win.setWindowSize(300,100);

win.setWindowPosition(450,400);

<b>https://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/services/session/api/IWDWindow.html</b>

Hope this helps,

Regards,

Arun

former_member751941
Active Contributor
0 Kudos

Hi Suresh,

"createModalWindow" is not a depricated method.

Check this code.

IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(

"SalesAreaWindow");

// create the Window

IWDWindow window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

window.setWindowPosition(WDWindowPos.CENTER);

window.setTitle("Sales Window");

window.setWindowSize(100,100);

// Save WindowInstance in Context

wdContext.currentContextElement().setWindowInstance(window);

// and show the window

window.show();

"WindowInstance" is the context attribute of type "com.sap.tc.webdynpro.services.session.api.IWDWindow"

Regards,

Mithu

Former Member
0 Kudos

Thanks.. i have marked the points

Answers (0)