About Java source code

0
Hi There!   If anyone knows, could you please tell me?   The java source code that is described as such, when edited, reverts back to its original state when deployed. Why is this? Also, how can I edit the source code?   Thanks, Iwata
asked
2 answers
2

Hi Sugura,

 

Once you deploy the code for eclipse and open the java file in eclipse. You could see a method called "executeAction()". And in that method, you could find a lines with comment "// BEGIN USER CODE" and "// END USER CODE". And if you have to write any code, you need to write the logic between both the lines to make it work.

 

Hope this will resolve your issue!

 

answered
0

Apart from adding import lines, the only place you can edit your Java Action code is between the comments marked // BEGIN USER CODE and // END USER CODE

Any other code in the Java Action file will be lost when you compile your application.

https://docs.mendix.com/howto/logic-business-rules/extending-your-application-with-custom-java/#4-editing-the-java-action-in-eclipse

You can also add custom Java files for your Java Actions to call, and these won’t be changed when you rebuild your application or Deploy for Eclipse.

I hope this helps.

answered