cancel
Showing results for 
Search instead for 
Did you mean: 

How window open on button click event in same application

Former Member
0 Kudos

Hi,

In my application i have two windows which contain single view. Now i want to call window on button action . So can any one tell me code for that .

Regards,

Gurprit Bhatia

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

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

// get information of window in controller context

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

window.setWindowPosition(WDWindowPos.CENTER);

window.open();

// store information of window in controller context

wdThis.wdGetAbhiappController().wdGetContext().

currentContextElement().setWin(window);

destroy the window

public void destroyModalWindow( )

{

//@@begin destroyModalWindow()

modalWindow.destroyInstance();

//@@end

GS

former_member201361
Active Contributor
0 Kudos

hi,

further information related to the pop up window , u can refer this link.

[http://help.sap.com/saphelp_nw04/helpdata/en/75/064640c0e56913e10000000a1550b0/frameset.htm]

thanks and regards

0 Kudos

hi,

try this code to pop up a window

IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("<windowname>");

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

Window.setTitle("Cancel");

Window.setWindowPosition(WDWindowPos.CENTER);

Window.open();

former_member201361
Active Contributor
0 Kudos

hi,

use the below code for pop up windpw

write this code in the onaction of the button.

Which ever Window you wanna open as popup(window with the desired view, say TestWindow), Just code the following in the Method which should open. i,e

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

window = wdComponentAPI.getWindowManager().createModalWindow(windowInfo);

window.setTitle("Test Popup Window");

window.setWindowSize(450, 280);

window.setWindowPosition(50, 75);

window.show();

Hope this helps.

thanks and regards

Fistae