Problem after globals.DIALOGS.showFormInModalDialog()

After I display, then dismiss a simple alert dialog using this command, I’m finding that the save and cancel buttons don’t work on the main data entry form. The alert dialog has no buttons (just the Servoy default “x” at the top), and the main data entry form save/cancel buttons use the command application.showForm(forms.browse_form).

Has anyone experienced this?

Thank you,
Don

Hi Don,

Did you manually set the height of the dialog? I did started to fix something in that area.
Can you show us some code ?

Hi Robert,

I don’t know what you mean by manually setting the height of the dialog. It’s fixed from design mode.

The code is very simple for showing the dialog (global method):

function UTIL_alertDlg(alert, windowTitle, action) {
	globals.tempTextDisplay2 = alert;
	if((action) && (action.match(/large/i))) {
		globals.DIALOGS.showFormInModalDialog('alert_withBtn_lg_dlg', -1, -1, -1, -1, windowTitle);
	} else {
		globals.DIALOGS.showFormInModalDialog('alert_withBtn_dlg', -1, -1, -1, -1, windowTitle);
	}
}

A sample call to this method is,

tempText = 'The main (base) form is already part of the IEP, and can\'t be added again.';
windowTitle = 'Cannot add main form...';
globals.UTIL_alertDlg(tempText, windowTitle, null)

The parent (data entry) form has methods attached to the Save and Cancel buttons that return to the browse form,

function btnSave(event) {
	application.showForm(forms.browse_form);
}

As long as I use the alert dialog with the button on it, I can then save or cancel the parent form. However, if I use the form without the button on it, I can’t save or cancel the parent form. Even more strange, if I use the “x” box on the form with the button on it, then I cannot reopen the record from the browse window (even thought it lets me save or cancel).

Thank you,
Don

Hi Don,

Just to be clear. You have this issue in Webclient or in Smartclient (so I know where to look)?
And from the screenshots I can see you are using Servoy 5.x, correct?

djlapin:
However, if I use the form without the button on it, I can’t save or cancel the parent form. Even more strange, if I use the “x” box on the form with the button on it, then I cannot reopen the record from the browse window (even thought it lets me save or cancel).

So it has everything to do with closing the dialog via the X.
And you say you can’t reopen the record, you mean open it in a new dialog? Or do you mean something else?

Hi Robert,

This is with the web client, and v.5.2.11.

After the problematic dialog closes, the user is returned to the data entry form, which contains save and cancel buttons. Pressing one of these buttons (e.g., btnSave) returns the user to the browse form, which has several tabless panels. Two of the tabless panels contain table (list) forms, with each row containing a button to edit the listed row. After using the “x”, clicking on the button in the listed row no longer works.

Is there some way to disable the “x” from showing up at all? It really isn’t an expected element in my interface.

Thanks for responding so soon,
Don

Hi Don,

Seems there are some funny things going on when you press the X in Servoy 5.2.x. In 6.0.3 things seem to work correctly.
Servoy is looking into this issue.
Are you able to test your solution in Servoy 6?

As for the X, you can’t hide/remove it. It’s part of the window. Ditto for dialogs in smart client.
I guess you can file a feature request for this to have the option to remove it.

Hi Robert,

I’m pretty new to Servoy. The last two times I tried to move up to v.6 bad things happened. In the most recent, I tried following some advice from Jason M to copy the postgres_db and the database folders, then import the solution, but it still didn’t want to run the postgres db. In 5.2.11, also, I am no longer unable to run the Smart Client…it comes up gray.

Thank you,
Don