Converting to - problems with java actions

Could anyone provide a list of changes in After updating I get a lot of errors in the javacode. For example: import com.mendix.modules.exportmanager.excel.ExcelGrid : doesn't exist anymore Configuration.getTempPath() - results in an error "Cannot make a static reference to the non-static method getTempPath() from the type Configuration" A lot of methods get an extra parameter for the context. What are the solutions to make my work easier? I didn't find anything about these problems in the documentation yet.
2 answers

Hello Richard,

The documentation page "Moving from 2.4 to 2.5" does not contain information about API changes for Java actions yet. This is an omission, it will be added as soon as possible.

Concerning the examples you gave:

  1. com.mendix.modules.exportmanager.excel.ExcelGrid was never meant to be used in Java actions, but was not obfuscated in 2.4, which is why you could use this class in that version. Only classes in com.mendix.modules.exportmanager.interfaces should be used for Excel export. This is enforced in 2.5, which causes the error you describe.
  2. The Configuration class can no longer be accessed statically in 2.5. Core.getConfiguration() can be used to obtain the Configuration object.
  3. In 2.5 security has been improved, a consequence of this is a lot of methods need the IContext parameter to do security checks.

Hope this helps to solve your errors, thank you for pointing out this omission in the documentation.


For your first problem, try using the IExcelGrid, it can be found in com.mendix.modules.exportmanager.interfaces.excel.

For your second problem, you can obtain the configuration by calling Core.getConfiguration() now.