on 05-25-2010 11:03 AM
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
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();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please check the below link.
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/70c5186d-2d08-2d10-a6b6-818e832d05d8
Regards,
Sandip
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Imran,
Please have a look at below document for implementing popup window in web dynpro for Java application.
Hope it will helps
Regards
Arun
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.