on 07-23-2009 11:14 AM
Dear Experts
I am creating a window using the Class IWDWindow and I am able to popup the window. In the new window I am having a button called Cancle, On click of it I need to close the window.
window.close() is not working
Can you please suggent me how to close the window on cancel button click
Regards
Noel
Hi,
Go through the below thread
Hope this helps you..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
try this
IWDWindowInfo windowInfo = (IWDWindowInfo)wdComponentAPI.getComponentInfo().findInWindows("AddressbookWindow");
IWDWindow window = wdComponentAPI.getWindowManager()
.createWindow( windowInfo, true);
window.setWindowPosition(300, 150);
window.open();
create a context WINDOWINSTANCE of type IWDWINDOW in component controller and map better the main and popup view
// Save WindowInstance in Context
wdContext.currentPopupElement().setWindowInstance(window);
in the Cancel button create a action and write this code
IWDWindow window =
wdContext.currentPopupElement().getWindowInstance();
window.destroy();
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Noel,
try setting the attribute value in component controller rather then in main view.
Just give it a try
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel,
Are you binding the window instance from view1 to controller and then controller to pop up view?
if the window object is null that could mean that the value is not passed from main view to pop up view
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
Refer this pdf, step by step procedure is there.
Regards,
Sunaina Reddy t
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see no reason why close() should not work (even if it is deprecated in newer versions). Please post the code of the action handler for the "Cancel" button. Are you sure the action handler is called at all?
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Noel
Use window.destroyInstance(); method to distroy window
Regards
Ruturaj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
check this article for closing pop up window
you have to write following code on close button
IWDWindow window = wdContext.currentPopupNodeElement().getPopupAttribute();
window.hide();
window.destroyInstance();
you can also try the following code
Create a new window and embed the popup view
create a windows instance
to start the popup:
IWDWindowInfo windowInfo = wdComponentAPI.getComponentInfo().findInWindows("PopUP");
IWDWindow window = wdComponentAPI.getWindowManager().createWindow(windowInfo, true);
window.setWindowPosition(300, 150);
window.open();
wdContext.currentExternalWindowElement().setWindowInstance(window);
to close the popup
IWDWindow window=(IWDWindow)wdContext.currentExternalWindowElement().getWindowInstance();
window.destroy();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use window.distroy() method.
0r
window.distroyInstance();
or
window .hide()
or
wdThis.wdGetPopAppController().closePopup();
Regards,
Sunaina Redyy T
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.