cancel
Showing results for 
Search instead for 
Did you mean: 

How do i get Window instance

Former Member
0 Kudos

I created a popup window and i want to close the window on click of a button. How do i get the window instance

Thanx

Mike

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Thaans a lot....Le mee try and get back to you....

Mike

Former Member
0 Kudos

Thanx again...

I am able to get the window instance and close it . When I run the application for the first time it is working fantastic...but, when I run it for subsequesnt times time it says that window is already open. Can you help me out with this...

Mike

Former Member
0 Kudos

Hi Mike

You need to destroy the window instead of closing. This you can do this as follows.

if iwdWin contains the window instance then

use

iwdWin.destroy() method and try it.

Kishore

Former Member
0 Kudos

Hi Kishore

Thanx for the solution. Now it is working fine....

Mike

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

2.In the (First)calling View write a eventHandler and place the following code in the eventHandler

IWDWindow window = wdContext.currentPopupElement().getWindowInstance();

window.destroy();

2. In the componentController write a eventHandler that will fire the above view event

Ex: wdThis.wdFireEventDestroySelectedEvent();

3. In the PopupView , place a button and in the action call the componentController event.

Regards, VIP

Cal

Former Member
0 Kudos

Hi Mike

Create a context variable.

Right click on the context variable.

click on properties and choose type ....

A pop up window opens and choose java native type

click on browse and type IWDWindow and click on ok

Assign the instance of the window to this context variable.

Kishore