Supersede loading a page

1
Hi everyone, I have following piece of code to load a page in a dom mx.ui.openForm(formPath, { location: "content", title: formTitle, context: context, domNode: domNode, error: (_err) => { }, callback: (form) => { } }); In Mx7.13 and earlier  version, everything works fine. I see the loaded page in the position of the dom. However in Mx7.14, i got the following log (in client and in modeler), and i only see the loaded page but not the "host" page. Ignoring error for page TestSuite/CapturePage.page.xml: Loading of a page has been superseded by request for TestSuite/CapturePage.page.xml Is there anyone know to solve the problem?   Best regards,
asked
2 answers
1

I found out that if "location" parameter is set explicitly to be "node", it actually does the job: load a page then open it in the domNode. (in the previous version, if you set value for domNode, the "location" will be override)

The new "node" option, however, is not clearly documented in https://apidocs.mendix.com/7/client/mx.ui.html

 

answered
1

DUC BUI has the correct answer, to alter the "location" property.
I would also like to add the following comment as a reminder to you to make the new openForm function work in 7.14.1.
When you only have defined the "domNode" property and not a "location" property within 7.14.1 the openForm function will also fail.
To get it up and running again just define the "location" property and set it to "node".

mx.ui.openForm("MyFirstModule/Puppies.page.xml", {
     location: "node",
     domNode: document.getElementById("yourDOMNodeID"),
     context: context,
     callback: function(form) {
     },
     error: function(form) {
     }
});

 

answered