cancel
Showing results for 
Search instead for 
Did you mean: 

how to create popup window

Former Member
0 Kudos

hi,

i am new to web dynpro. i am getting a name in inputfield, when i press a button it should get displayed in the popup. how can i do it? can anyone explain it?

thanx..

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

This code will solve ur problem.

1)create one value attribute in view context of type string.

ex: value attribute name is fname

2)create on input filed

3)bind this value attribute(fname) to input field.

in input filed properties u find one value field bind this fname to that filed.

4)create on button.

5)in button action u write this code.

IWDControllerInfor controllerInfo=wdControllerAPI.getViewInfo().getViewController();

String dialogText = wdContext.currentContextElement.getFname();

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");

Regards,

Sunaina Reddy T

Former Member
0 Kudos

solution provided by experts does not work. i need step by step explanation.

Former Member
0 Kudos

Hi,

1)Create the attribute at controller context.

2)create two views and map to the controller.(first one and the other which you want in popup window)

3) now in first view under action button write the follwing code to create a window(create new window)

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

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

window.setWindowPosition (300, 150);

window.show();

wdContext.currentPopupNodeElement().setPopupAttribute(window);

4) In Navigator modeler of new window(which has second view) embed the existing first view and then create Inbound and outbound plugs.

Regards

Raghu

Former Member
0 Kudos

Hi,

This code will solve ur problem.

IWDControllerInfor controllerInfo=wdControllerAPI.getViewInfo().getViewController();

String dialogText = wdContext.currentContextElement.InputFiledName;

IWDConfirmationDialog dialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialogText,controllerInfo.findInEventHandlers("ok"),"ok");

get the inputfiled name from context attribute and put in dialogText variable ur problem will solve.

Regards,

Sunaina Reddy T

Former Member
0 Kudos