showFormInDialog limitations or bad behaviour in web client

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

showFormInDialog limitations or bad behaviour in web client

Postby gianni » Tue Aug 19, 2008 7:14 pm

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
gianni
 
Posts: 64
Joined: Sat Feb 12, 2005 2:26 pm
Location: Vercelli, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby rgansevles » Wed Aug 20, 2008 9:33 am

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.

The smart client uses swing who blocks the current thread when a modal dialog is shown, execution continues after the dialog closed.
This is unfortunately not possible in the web client where the dialog is just some output to be displayed in the browser, execution continues after the output has been generated.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1927
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL

Re: showFormInDialog limitations or bad behaviour in web client

Postby gianni » Wed Aug 20, 2008 2:46 pm

Your answer confirm showFormInDialog() is NOT compatible between smart client and web client...

I think to realize portability of Servoy apps in different environments the same supported instruction/call with same parameters should have same behaviour under different context. Am I wrong?
I could understand the different basis of the two underlying technical implementation but when explicitly setting the parameter modal=true I was expecting modality in both impementation. I feel web client implementation is too short here...

I would like to ask: on web client should it be considered a standard functionality, a bug or an undocumented feature?

Tnks,
Gianni

P.S. By the way I missed to report the environment I am using: WinXP SP2 updated, Servoy 3.5.7 on iAnywhere10
gianni
 
Posts: 64
Joined: Sat Feb 12, 2005 2:26 pm
Location: Vercelli, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby ngervasi » Wed Aug 20, 2008 5:26 pm

Hi Gianni,
I'm not sure about the manuals but it's well documented in the forum.
Keep in mind that webclient has to coexists whit all the limitations of a web browser and so for the time being FormInDialogs will behave like this, in the future maybe Servoy R&D team will find a way to change the behavor, who knows?
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby gianni » Fri Aug 22, 2008 4:29 pm

Nicola,

I told before I understand the difficulties...and I found documentation on the forum at the end; it is a little bit frustrating having:
1) the PDF manual not enough consistent
2) the example available in Servoy developer with web client checked not enough consistent
3) spend (a lot of) time trying different solutions
4) finding finally a reasonable solution...
...but at the end with a reduction in development efficiency almost dramatic!

Anyway...tnks to confirm showFormInDialog() is NOT fully compatible between Smart Client and Web Client and to have real portability I/We should develop using the lowest common denominator approach.

What's about the other two questions? They are more critical to me/us because I/we definitively need Servoy web client working...

Should the one described be considered normal behaviour? I personally think NOT...
To use our very simple developing model should I/We define special settings on either FF and IE7 to avoid delays in FF and "working only once" in IE7 ?
Based on my others experiences IE6 should be avoided, could anyone confirm this? ...or should give it a try ?

Tnks for any help,
Gianni
gianni
 
Posts: 64
Joined: Sat Feb 12, 2005 2:26 pm
Location: Vercelli, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby ngervasi » Fri Aug 22, 2008 4:43 pm

Webclient works fine for me in FFox (mac and win), IE6 and IE7 and also Safari, for those issue you mentioned you should create a case in the support system and Servoy R&D will check and fix it.
At the fast development pace of servoy is not easy to keep the documentation up to date, that's why R&D team publishes very detailed release notes and hints in the forum.
For the rest: come to Servoy World, I'm hosting 2 sessions about WebClient development or get some advanced training, there's nothing so useful as an experienced developer teaching best practices and advanced techniques.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby gianni » Mon Aug 25, 2008 1:42 pm

Nicola,

Tnks again for your help...Unfortunately I cannot come to Servoy World...

I am currently preparing the test case for Servoy R&D...

Just a curiosity: is your implementation on webclient correctly working on FF, IE6, IE7, Safari with an implementation model (double level showFormInDialog) similar to mine or you are simply using a different implementation model?

Tnks,
Gianni
gianni
 
Posts: 64
Joined: Sat Feb 12, 2005 2:26 pm
Location: Vercelli, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby ngervasi » Mon Aug 25, 2008 3:00 pm

gianni wrote:ust a curiosity: is your implementation on webclient correctly working on FF, IE6, IE7, Safari with an implementation model (double level showFormInDialog) similar to mine or you are simply using a different implementation model?

Tnks,
Gianni


I'm not using double FIDs but I don't see any reason why it shouldn't work, be sure to reference that in the support case.
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby jcompagner » Thu Aug 28, 2008 4:35 pm

nicola is not telling the truth as far as i know
i have here currently noxs open and i see 2 FIDS in each other

first is a popup to create a new orderline and then the second is a warning dialog that not everything is filled in when i press the add without filling in everything..
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: showFormInDialog limitations or bad behaviour in web client

Postby ngervasi » Thu Aug 28, 2008 4:39 pm

Johan is right, I forgot about that one, it works fine for me in IE7, FFox (mac/Win) and Safari.

tnx Johan for pointing that out :)
Nicola Gervasi
sintpro.com
SAN Partner
ngervasi
 
Posts: 1485
Joined: Tue Dec 21, 2004 12:47 pm
Location: Arezzo, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby gianni » Tue Sep 16, 2008 10:55 am

Tnks for your replies and sorry for my late one...

What is it referred the word 'noxs' ?

I can confirm you the reduced case sent to Servoy support (156715) in my environment (WinXP SP2 full updated, Servoy 3.5.7, different browsers) shows different behaviours with various browsers and first time eveything seems working correctly:
• Firefox:
o When Main form is started first time the application react immediately, FID form and message form are shown
o When Main form is started second or more times the Messages form is not displayed immediately but after 3-5 seconds.
It is the better result! But the delay should be reduced…less than 1 second, not considering delays over the network, is acceptable.
• IE:
o When Main form is started first time the application react immediately, FID form and message form are shown
o When Main form is started second or more times the Messages form is not displayed at all! However every 3-5 seconds is shown on the message line (bottom of the screen) the application.setStatusText message available in the method associated to the button of the Base form, like that method is executed continuously.
• Opera:
o When Main form is started first time the application react immediately, FID form and message form are shown, but on the console some error messages appears reporting type errors and CSS errors
o When Main form is started second or more times the Messages form is not displayed at all!
o Additionally some layout problems are visible (scrollbars on both forms…back to base form screen refresh is not fully correct…)
• Safari:
o When Main form is started first time the application react immediately, FID form and message form are shown
o When Main form is started second or more times the Messages form is not displayed at all!

Regards,
Gianni
gianni
 
Posts: 64
Joined: Sat Feb 12, 2005 2:26 pm
Location: Vercelli, Italy

Re: showFormInDialog limitations or bad behaviour in web client

Postby jcompagner » Tue Sep 16, 2008 1:23 pm

we will look at your test case but i am curious you do want to show 2 dialogs in one
how do you show the second dialog? in the onshow for the first dialog?
or is it a button click on the first dialog?

i can guess that if you do it in an onshow of a dialog that then things are a bit tricky because
the first dialog has to be there first and then another roundtrip in that dialog has to happen.
So for this to show there are atleast 2 or 3 roundtrips and all should have the right context.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to Web Development

Who is online

Users browsing this forum: No registered users and 6 guests