cancel
Showing results for 
Search instead for 
Did you mean: 

pop up window

imran_khan20
Participant
0 Kudos

Hi,

Can any body tell me how to create a simple application which shows pop up window.for example my requirements,

1) I need to design a form where user name and password input fields are there including one button submit.

2) once we click on submit button it should open a pop up window.which should have ok and close button.

Regards

Imran

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hi imran,

follow this code for popup window:

for open popup window:

IWDWindowInfo windowInfo=(IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("popupwindowname");

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

window.show();

to close pop up window:

window.hide();

Former Member
0 Kudos
Former Member
0 Kudos

Hi Imran,

By using this code you have to Open Popup Window

public void popup( )

{

//@@begin popup()

poplink=wdComponentAPI.getWindowManager().createModalWindow(wdComponentAPI.getComponentInfo().findInWindows("Wd_POPupwindow"));

poplink.setWindowPosition(500,30);

poplink.open();

//@@end

}

Wd_POPupwindow-- This is Window Name Under this window you can create in View that view having OK and Close Buttion.

*When click on Submit button that time you call the popup method. that time you will get popup window*

Regards

Vijay Kalluri

Edited by: KalluriVijay on May 31, 2010 8:26 AM

former_member636545
Discoverer
0 Kudos

Hi Imran,

Create View 1 with username, password fields and submit button assign it to Window1 (default window)

Create view 2 with ok and close button and assign it to a new window, Window 2(you will have to explicity create a new window)

Create a context attribute PopUpElement of type IWDWindow in view 1 ( This is for opening and closing of the popup window)

On click of the submit button in view 1. Insert the following.

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI

.getComponentInfo()

.findInWindows("Name of Window2");

IWDWindow window = wdComponentAPI.getWindowManager()

.createWindow( windowInfo, true);

window.setWindowPosition(300, 150);

window.open();

wdContext.currentPopUpElement().setWindowInstance(window);

This should help you.

Regards

Christina Rodrigues

p330068
Active Contributor
0 Kudos

Hi Imran,

Please have a look at below document for implementing popup window in web dynpro for Java application.

NW7.0 - http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-tech...

CE7.1 - http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2066c269-a17a-2c10-8fa7-f6a690c59...

Hope it will helps

Regards

Arun

Former Member
0 Kudos

Imran,

Steps to be folllowed for creating popup:

a) Create a new view having ok and close buttons

b) Create a new window and embed the new view created in this window

c) Using IModalWindow API(http://help.sap.com/javadocs/NW04/current/wd/com/sap/tc/webdynpro/services/session/api/IWDWindowManager.html); create an object of newly created window

d) open the window as popup in parent view

Regards,

Gangadhar