cancel
Showing results for 
Search instead for 
Did you mean: 

How to capture Layout position

Former Member
0 Kudos

Hello friends,

I designed a layout (for long 2 pages).If i submit ,open a popup dialog box.The pop up dialog will open on center position at layout,But browser captures position on center at second page(in browser)

I have coded like d.setWindowPosition(IWDWindowPos.center)...Is possible to capture layout position and display at center?

Please give me idea for that...

Thanks & Regards

Mathi

Accepted Solutions (1)

Accepted Solutions (1)

former_member751941
Active Contributor
0 Kudos

Hi Mathi,

Inside the action of the submit button call the popup window.

IWDWindowInfo windowInfo =(IWDWindowInfo) wdComponentAPI.getComponentInfo().findInWindows(

"Put Window Name");

// create the Modal Window

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

// Display window in center

window.setWindowPosition(WDWindowPos.CENTER);

window.setTitle("PopUp window");

window.setWindowSize(100,100);

// Save WindowInstance in Context

wdContext.currentContextElement().setWindowInstance(window);

// and show the window

window.show();

Regards,

Mithu

Former Member
0 Kudos

HI Mithu

Thanks for ur reply.....My dialog is confirmation popup....

Popup works correctly...My problem is window position.....

window.setWindowPosition(WDWindowPos.CENTER);

I have desiged layout.the layout has two pages above...but the confirmation popup dislayed only on second page

for ex

Issue is

Layout

Page1

-

-

page2

-

dialog box is displyed in this postion i dont want like this

-

submit

close

I want like this

Layout

Page1

-

-

dialog box is displyed in this postion(this is center correct)

Page2

-

-

submit

close

Former Member
0 Kudos

Hello Mathi

The code

window.setWindowPosition(WDWindowPos.CENTER);

is most app code, but since its not working, you can do this trial and error of giving the absolute coordinates of your window. Like this :

window.setWindowPosition(300,500);

Try this, I hope it works

regards

Kapil

former_member751941
Active Contributor
0 Kudos

Hi Mathi,

Try This

String dialog = "Put Dailog Message";

IWDConfirmationDialog confDialog = wdComponentAPI.getWindowManager().createConfirmationWindow(dialog,wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Ok"),"OK");

IWDEventHandlerInfo CancelEventInfo = wdThis.wdGetAPI().getViewInfo().getViewController().findInEventHandlers("Cancel");

confDialog.addChoice(CancelEventInfo,"Cancel");

confDialog.setTitle("My Pop Up Window");

<b> confDialog.setWindowPosition(350,150);//Change x,y as you want

confDialog.setWindowPosition(WDWindowPos.LEFT);</b>

confDialog.show()

Regards,

Mithu

Former Member
0 Kudos

Thank u very much....Thanks for all

Answers (0)