on 07-18-2007 1:14 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.