In my solution I have navigator form . This form is always attached to other forms(navigator property of form), similar like in servoy sample solution. Now , for example I call one of my form from navigator form. The form loaded in main window.After this I want to call same form again but in new window (as modal for example) by click on same button in my navigation form. The servoy load new instance of modal form with navigator form in new window ,but at same time remove navigator form in my main window where it was Mode-less form. Now, from my new modal window I call again same form and navigator form disappears again, but a new instance of modal form created with navigator form in new window.
If I put button on my running form and use it to call same procedure to run multiple instances of modal form the navigator form disappear only from first instance of modeless form which running first when solution open. How to run a same form multiple times when solution open? May be Servoy has a problem ?
Here the part of my code:
function showform1(_formname){
var win = application.getWindow();
var winTitle = win.title;
var nPosition = winTitle.indexOf(_formname);
if(nPosition>0){
//run second time as modal,checked by title name of window
var _sUniqueName = utils.stringReplace(application.getUUID().toString(), "-", ""); // fix for the window name, it doesn't handle '-' in the name
var lOk = application.createNewFormInstance(_formname, _sUniqueName);
if (lOk) {
var wind = application.createWindow(_sUniqueName, JSWindow.MODAL_DIALOG);
wind.title = project_title + " - " + _sUniqueName
wind.show(_sUniqueName);
}
}else forms[_formname].controller.show(); // run 1st time as modeless
}