Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 82386

Call Microflow from JavaScript and show Progressbar

$
0
0

I have a microflow call in javascript using mx.data. The mx.ui provides a progress bar. How can I rewrite my code for mx.ui, or provide a progressbar using mx.data? Thankyou

mx.ui:

mx.ui.action("MyFirstModule.StartEngine", {
    context: new MxContext(),
    progress: "modal",
    callback: function(result) {
        console.log("Engine started: " + result);
    }
});

mx.data:

mx.data.action({
    params: {
        applyto: "set",
        actionname: "MyFirstModule.GetFavoriteFood",
        xpath: "//MyFirstModule.Cat",
        constraints: "[id=281530811285515 or id=281530811285506]",
    },
    callback: function(obj) {
        // expect single MxObject
        alert(obj.get("manufacturer"));
    },
    error: function(error) {
        alert(error.description);
    }
}, this);

Viewing all articles
Browse latest Browse all 82386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>