cancel
Showing results for 
Search instead for 
Did you mean: 

popup development in Web Dynpro

Former Member
0 Kudos

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...

With Regards

Vijay

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

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);

window.open();

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>();

window.destroy();</i>

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.

Regards,

Rathna.

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Vishal,

This can be done in the same component.

Create a new window.

Add a view with the required fields for 'contact info' to the new window.

create the required context nodes/attributes in the new view's controller, then specify the requires UI bindings and map them to the component controller.

Create a context attribute "WindowInstance" of Java Native type:IWDWindow in the component controller as well as in the two view controllers and map them.

in the button click action of the main window's view, call the subwindow:

IWDWindowInfo windowInfo =(IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("<NEW WINDOW'S NAME>");

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

window.setWindowPosition(350, 200);

window.setWindowSize(200, 50);

window.open();

wdContext.currentContextElement().setWindowInstance(window);

Then, u should give the code for closing the window in the save button click of the popup window:

IWDWindow window =wdContext.currentContextElement().getWindowInstance();

window.destroy();

regards

Shyam.

Former Member
0 Kudos

Hi Vishal...

To get popup windows in application follow this links...

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/webdynpro/dialog%20boxes%20in%20web%20dynpro%20applications.pdf">Dialog Boxes in Web Dynpro</a>

-


<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/business_packages/a1-8-4/10tutwd_popup.zip">sample application zip</a>

regards,

Vijay

get back for more help....