on 08-15-2010 1:07 AM
HI ,
How can i close on popup window from another popup window , both are called simulatanously on same action however i want to close one popup on click of cancel button on another popup window.
Rgds
Hi Akeel,
Try the following:
1.Create 2 attributes say Window1 and Window2 of the type IWDWindow in your component Controller, PopupView1 and PopuView2 for your two Popup windows.
2.Map the Window1 and Window2 attributes from the views to the same attributes in Component controller so that whenever you set those attributes inside the views, they get stored in the Component controller also. that way, if you set an attribute from Popoupview1, the value becomes available to PopuView2 via the Component Controller.
3. The code to op1n the popup will give you a IWDWindow object when you do something similar to
IWDWindow wind1 = wdComponentAPI.getWindowManager().CreateWindow(<parameters such as Window id>);
IWDWindow wind2 = wdComponentAPI.getWindowManager().CreateWindow(<parameters such as window id>);
4. You can store those IWDWindow objects in the above attributes in your Component controller
e.g.Something similar to
wdContext.currentContextElement().setWindow1(wind1);
wdContext.currentContextElement().setWindow2(wind2);
5. After you have set these attributes in your Component controllerrough your views, you can access the references to those IWDWindow objects(references to the popup windows) them in your other popup view by accessing those context attributes from the Component Controller. Thatt means in your cancel button of your PopupView1, you can close the Popup window 2 as follows:
e.g. Something similar to
IWDWindow wind2 = wdContext.currentContextelement().getWindow2();
wind2.destroyWindow();
Regards,
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Ajay ,
this seems to be a good approach , but is there a way i can close the popup rendered first from the popup rendered second , however these both are trigered at the same action in the code one after the other only that i want to close the frist popup from the second popup
the above approach gives me the dump saying that popup 1 which i am trying to close from 2 sits on top of the stack
Rgds
thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
is there a way i can close the popup rendered first from the popup rendered second , however these both are trigered at the same action in the code one after the other only that i want to close the frist popup from the second popup
the above approach gives me the dump saying that popup 1 which i am trying to close from 2 sits on top of the stack
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.