Defect #335
Request for a 'close' function
0%
Description
I am using it in a solution that is sending emails from a web page.
If the email goes successfully, I am displaying a dialog saying 'success' and have a button saying 'Done' on it.
This gets passed back to a global and my client wanted the web page/solution to close when the email was sent successfully so that the Servoy client licence wasn't kept in use, in case the user left the browser open
so I am doing this
@
globals.send_form_nhs_mail ( event, globals.send_to, globals.send_subject, globals.send_msg_txt, globals.attachment_file_name, globals.send_msg_type );
if (( application.getApplicationType ( ) APPLICATION_TYPES.WEB_CLIENT ) && (globals.button_pressed 'Done'))
{
application.sleep(3000) ;
application.closeForm(true) ;
application.closeSolution() ;
}
@
where your dialog is being called in the globals.send... method,
@
if ( globals.is_headless != 1 )
{
if ( !success )
{
globals.DIALOGS.showWarningDialog ( 'Alert', plugins.mail.getLastSendMailExceptionMsg ( ), 'OK' );
}
else
{
globals.button_pressed = globals.DIALOGS.showInfoDialog ( 'Success', globals.send_msg_type + ' Sent Successfully!', 'Done' );
}
}
@
but what is happening is that your 'dialog' is not closing, so the solution closes in that window and things look weird.
I added the sleep hoping it would give it enough time to go, but it doesn't, so could you add a 'globals.DIALOGS.close();' to allow me to force it to close? (I also added the closeForm, but that didn't help...)
Files
Related issues
History
Updated by Robert Ivens almost 14 years ago
- Status changed from New to In Progress
I've got Johan looking at it now. It might be related to this reported issue : https://forum.servoy.com/viewtopic.php?f=9&t=16373
Updated by Robert Ivens almost 14 years ago
- File mod_dialog.servoy added
Can you try this version and see if still see the 2 issues you reported.
Updated by Robert Ivens almost 14 years ago
- File mod_dialog.servoy mod_dialog.servoy added
New version for you to test.
Updated by Robert Ivens almost 14 years ago
- Status changed from In Progress to Resolved
Version 1.1.2 that is just released should solve the issues you have. To make it work properly in the web client you need Servoy 5.2.10 or 6.0rc3 (or higher).
Both Servoy versions are not yet available at this time.