We have a solution with several table views where clicking on the field of such a table view opens a modal input-dialog, allowing the user to modify the record.
In the onAction of the clickable field, we only open up a form.
var vWindow = application.createWindow('test_popup',JSWindow.MODAL_DIALOG);
vWindow.show('test_popup');
We have some users that have the inability to use a single-click ( ) and always use a double-click. This causes the onAction to fire twice and now shows “error calling server” in the modal dialog when the user wishes to close the dialog. The onAction for the close button on the popup form:
application.getWindow('test_popup').destroy();
In our struggle to handle the double-click behavior,we modified the onAction on the table view:
var vWindow = application.getWindow('test_popup');
if (vWindow) {
vWindow.destroy();
}
application.createWindow('test_popup',JSWindow.MODAL_DIALOG);
vWindow.show('test_popup');
This works a littlebit better, but still the problem occurs now and then.
We already told the users not to double-click the fields, but is there a way to handle those onAction events being fired twice?