I am trying to put together a very simple framework to test functionality in Servoy web client; my final goal is to have a common framework for Smart client and Web client.
The framework is very simple:
- A base form (Let's call it THE MENU, setting autosave off)
- A management form (To manage some user data with transaction support)
- A message form (To display informations as well as requiring user input pushing a button)
Servoy code used is very very very simple:
On the base form there is a button and the associated code is:
Button08 > onAction:
application.showFormInDialog(forms.tstTEST008, -1, -1, -1, -1, 'myTitle', false, false, 'myDialog', true);
return;
On the management form there are three events with few lines of code:
onShow:
application.setStatusText( ' ');
controller.find();
var recordCount = controller.search();
databaseManager.startTransaction();
globals.temp01 = new Date();
application.showFormInDialog( forms.tstTEST008a, -1, -1, -1, -1, 'Messaggio', false, false, 'MessaggioModale', true);
application.setStatusText( 'After the first formInDialog');
return;
onHide:
databaseManager.rollbackTransaction();
return;
Button01 > onAction:
databaseManager.saveData();
databaseManager.commitTransaction();
application.closeFormInDialog();
return;
The message form has code in it similar to the management form but without any transaction control:
onShow:
globals.temp01 = globals.temp01 + ' entrato il ' + new Date();
return;
onHide:
return null;
Button01 > onAction:
application.closeFormInDialog();
return 'OK';
Pushing the button on the menu form I am expecting two forms in dialog to show up and the user must exit from message first and from management form second. In Smart Client everything work as expected.
What I have found testing this small piece of code on web client is:
1) showFormInDialog is not compatible between Smart Client and Web Client; in Smart client execution of the method is correctly stopped, as reported from Servoy documentation, when the showFormInDialog is called while in the web client IS NOT STOPPING AT ALL. If I put any more code in the method after the showFormInDialog instruction on the Smart Client the code is executed when the user exit from the FormInDialog while in web client the code is executed immediately when the FormInDialog is shown.
2) Testing the code on web client in Firefox is executing almost instantly the first time while if I exit the two FormInDialog and push the button to show them again the management one is shown immediately while the message one is always showing after approximately 3 seconds.
3) Testing the code on web client in IE7 is executing almost instantly the first time while if I exit the two FormInDialog and push the button to show them again the management one is shown immediately while the message one is NEVER SHOWN AGAIN.
Before going to test with other browsers, could someone please clear me if these three behaviours could be intended as functionality or misfunctionality or bugs or more simply I do not know/understand something?
Tnks,
Gianni