Javascript file in java action

0
I am having problems in integrating a javascript file in a java action. When i run in the modeller, i get an errror which says 'Error compiling java actions' how best can this be done?
asked
4 answers
1

Javascript is an entirely different language than Java so no, this is not going to work. At some point they happened to have an overlap in name, which in hindsight was a terrible choice.

http://stackoverflow.com/questions/2018731/why-is-javascript-called-javascript-since-it-has-nothing-to-do-with-java

Or another personal favorite: "Java and Javascript are similar like Car and Carpet are similar."

answered
1

Harry - You might take a look at the recently released REST module in the Appstore. It looks like this module could fit the bill for you. I took a look at the integrations available from mixpanel, and you I think REST could fit the bill for performing http interaction with mixpanel - as described here: Mixpanel HTTP API Reference

Hope that helps, Mike

answered
1

Hi Helma,

Your best approach to using a Javascript API is to build a javascript widget which you can place on one of your mendix forms. There is a tutorial here:https://world.mendix.com/pages/releaseview.action?pageId=11439212

You should also look at other existing widgets on the appstore to get an idea on how they are built and you may be able to reuse some of the functionality.

I had a look at the mix panel api and they have a java api: https://mixpanel.com/help/reference/java

I would suggest using the java api, which seems to do what you need.

answered
0

thank you very much for your response. then, how best can a mendix java action call an external servive like Mixpanel (https://mixpanel.com/segmentation/) using javascript

answered