i have a problem when closing a modal-dialog window.
I create a modal dialog in this way
- Code: Select all
function openModalDialog ( form, windowName ) {
var dlg = application.createWindow( (windowName ? windowName : application.getUUID().toString()) ,JSWindow.MODAL_DIALOG );
dlg.undecorated = true;
if ( form.setWindowName && ( form.setWindowName instanceof Function ) {
form.setWindowName( dlg.getName() )
}
dlg.show( form );
}
If a close a dialog form by clicking on a button in the form all works well,
- Code: Select all
function closeModalDialog ( windowName ) {
var thisWindow = null;
if ( windowName ) {
thisWindow = application.getWindow( windowName );
}
if ( thisWindow ) {
thisWindow.destroy();
}
}
function closeForm ( ) {
scopes.UI.closeModalDialog( getWindowName() );
}
but when i call the function to close the window from my webcomponent ( using servoy 7.4.6 ) the modal window is destroyed but remain in webclient and is not possible to close it in any way
- Code: Select all
....
function callBackFromWebcomponent ( data ) {
// do something
closeForm();
}
function closeForm ( ) {
scopes.UI.closeModalDialog( getWindowName() );
}
and if i try to get the window again
- Code: Select all
application.getWindow( windowName );
the function return null value
Is there a possible bug or i'm wrong something?
Thanks