Are you sure you want to navigate away from this page? Reloading this page will cause the modal window to disappear. Press Ok to confirm or Cancel to stay on the current page.
When you pop a dialog the actual pop MUST be the last line. So you can’t code an exit after the pop in that same method. The pop form could have an onshow method that exits perhaps.
From within a webcient FormInDialog I tried the following:
forms.myexitform.controller.show();
with application.exit() as the onshow method of myexitform. At first it appeared to work, but now that I have tried it a few more times I see that it does not work consistantly. I will try a few more variations.
Hi Dean,
exiting the session from within the FID has some drawbacks: whatever URL you want to load after the session is closed will be loaded INSIDE the FID, so if you are using a modal FID this is not the way to go.
Now a screen is shown where confirmation is asked.
If users replies ‘YES’ then some action must be done and the application must be quited. I that case I want the user to see some internetpage:
So my method onYes is as follows:
//
// Do some methods
//
application.closeFormDialog();
application.showURL('http://www.post.be/', '_self');
security.logout() // perhaps the logout must be before showURL???
The problem is, that the internet page (www.post.be) is shown in the dialog form and not in my original browser.
And different from the smartclient, in the webclient after the
application.showFormInDialog
all code is executed directly. So putting this code after the application.showFormInDialog() is no option as well (like Jan already replied).
Is there some action that is triggered on my main form when Dialog is closed? I tried to see of onShow is executed again, but that is not the case (even when I do controller.show() again). There is also not a onFocusGained for a form, so that is also not possible.
I tried to put an extra form that will be called. This form shows only message that the order has been completed:
application.closeFormDialog();
// If written to the database, then status =2
if (_to_webshop_session.record_status == 2)
forms.webshop_finished.controller.show()
That works, but now I also want to logoff the user. while this screen remains visible.
So I thought in the onShow of my form new to do a logout
application.closeFormDialog();
// If written to the database, then status =2
if (_to_webshop_session.record_status == 2)
forms.webshop_finished.controller.show()
is not working. It is not a URL that I’m calling.
Some message about leaving the page (see screenshot)
This means that there is no way that you can move to another form on leaving the dialog
So there is 1 solution left, replacing the dialog by a full screen form