is there a subsitution for the function application.showFormInDialog()
As a result of a doubleclick on a listitem, I want to show a modal editform for this item in a seperate window! The opened form should be able to return a value to the calling form. Is this possible?
Thanks for your answers!
ShowFormInDialog (a.k.a a FID) is deprecated in Servoy 6 and replaced with the JSWindow class.
You can create a JSWindow instance via the application.createWindow() function.
Check out the JSWindow node under the application node in the Solution Explorer tree for all the functions and properties.
Thanks for all you answers.
I now know a lot more … but I still have a problem. I designed my code like this:
var windowName = "xxWindow";
var formName = "xxForm";
application.createNewFormInstance("frm_message", formName);
var form = forms[formName];
var window = application.createWindow(windowName,JSWindow.MODAL_DIALOG);
form.controller.show(window);
[...]
// if the OK-button is pressed in the "form", the form variable "fv_retval" is set to "true"
// if the CANCEL-button is pressed in the "form", the form variable "fv_retval" is set to "false"
[...]
var retval = form.fv_retval;
if (retval){
plugins.dialogs.showInfoDialog("Note", "Hello World", "OK");
}
[...]
If I run this code in the smart client, everything is fine. The programm is waiting at line “form.controller.show(window);” until the called form terminated by pushing “OK” or “CANCEL”. But whenn I run this code in a web client the programm is not waiting until the called form is closed!
Why? What can I do? Are there any solutions?
Thanks a lot!
MIKE