Close form from a java script widget

4
Is it possible to close the form the java script widget is placed in, via a microflow triggered from within the java script widget? The normal close form does not work. I am struggling with the GridView widget but have in-counted this problem with other java script widgets. I could use a normal datagrid but i want to keep all my forms consistent.
asked
3 answers
4

Yes, it is possible to handle close form instructions in your widget. See this answer.

answered
3

This might be late but hopefully this will help somone in the future :

To make gridview close a page after executing a mf action:

//In Gridview.js add the following line in the startup function around line 1118: this.offerInterface("close");

//Then add the follwoing function: close : function() { this.disposeContent(); },

//There is also a bug in the mf function in the commons.js file which do not pass the context: //on line +-377 change the following line: mf(mfname, dataitem, cb);

//to: mf(mfname, dataitem, cb, context);

Hope this helps!

answered
0

Close forms triggered from microflows called by custom widgets do not work by default. Please submit a support ticket at support.mendix.com if you need this.

answered