showFormInDialog

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

showFormInDialog

Postby srowe » Thu Jun 18, 2009 9:42 pm

I have a web application that I am using showFormInDialog for a modal form.

The form that is shown has three buttons, Continue, Cancel and Exit.

I use a global variable that I set to 1 before the ShowFormInDialog.

The form shows, user clicks the Continue Button. I have a function on the button that sets the value of gvOK to 0;

When the application returns to the calling function, the value of gvOK is still set at 1.


Any suggestions on how to get the return value from showFormInDialog?


Thanks!

Servoy

Version: 4.1.3 - build 672
srowe
 
Posts: 74
Joined: Wed May 02, 2007 3:01 pm
Location: USA Missouri

Re: showFormInDialog

Postby Andrei Costescu » Fri Jun 19, 2009 10:00 am

There is a difference in web-client - the code in the method that opens the modal form continues to run after the form in dialog is open (due to implementation constraints), as opposed to smart client where the code will continue to run only after the dialog is closed. This has been discussed a lot (I think on the forum as well so you should find other topics about this) - the bottom line is that in web-client you can do the following:

  • initial code:
    Code: Select all
    function someFunction() {
        [... code before open dialog]
        application.showFormInDialog(...);
        [... code after you would expect dialog is closed]
    }
    function dialogActionThatClosesTheDialog() {
        [... change some global for example and close dialog]
    }
  • new web-client compatible code:
    Code: Select all
    function someFunction() {
        [... code before open dialog]
        application.showFormInDialog(...);
    }
    function someFunctionContinued() {
        [... code after you would expect dialog is closed]
    }
    function dialogActionThatClosesTheDialog() {
        [... change some global for example and close dialog]
        someFunctionContinued() ;
    }
Andrei Costescu
Servoy
Andrei Costescu
 
Posts: 1018
Joined: Tue Jun 26, 2007 3:14 pm

Re: showFormInDialog

Postby Hans Nieuwenhuis » Fri Jun 19, 2009 10:24 am

Hi,

Paul Bakker also discussed this issue in his Webinair on Javascript.

I think this webinair has been recorded.

Regards,

Hans
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: showFormInDialog

Postby srowe » Fri Jun 19, 2009 6:05 pm

got it to work.


Thanks for the direction.....
srowe
 
Posts: 74
Joined: Wed May 02, 2007 3:01 pm
Location: USA Missouri


Return to Web Development

Who is online

Users browsing this forum: No registered users and 4 guests