popup development in Web Dynpro
Hi All, Anybody help me , how to proceed for the popup development in webdynpro. My scenario is like, I have one Webdynpro form that contains some set of fields, along with there is a button called "contactInfo", by click on that , popup window need to comeup to enter the contact information click on save button in that popup window , the control should go back to the previous window( parent window), Please help me any body , should I create the new iview in the same webdynpro component or need to create a iview in the seperate webdynpro component by calling one window in another with predefined function. In the second case the how the integration should be done?How to proceed...
To open a popup window:
1)Create another window and embed a view in that window.
2)Create value attribute of type <i>com.sap.tc.webdynpro.services.session.api.IWDWindow</i> in both the views as well as in the component controller.
3)Map the corresponding attribute through the component controller.
4)Give the following code in the method onaction of the button contactInfo.
//To open the popup window
<i>IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("<popup window name>");
IWDWindow window =wdComponentAPI.getWindowManager().createWindow(windowInfo,true);
wdContext.currentContextElement().set<window instance att. name>(window);</i>
5)Give the following code in the method onaction of the button save in the view of the popup window.
//To close the popup window
<i>IWDWindow window =wdContext.currentContextElement().get<window instance att. name>();
Also go through this link <a href="http://help.sap.com/saphelp_erp2005/helpdata/en/b0/184540631d6f13e10000000a1550b0/frameset.htm">Dialog boxes in webdynpro</a>.
Hope this helps.