Entity is mandatory when adding a list parameter. Why?

0
Hi everyone,   I'm currently working on a Mendix project and have encountered a limitation when creating Java actions. Specifically, when defining a list input for a Java action, I am required to specify the entity type for that list. This restriction limits the reusability and flexibility of the Java action across different parts of the application, as it can only process lists of the specified entity type.   Here are my questions: Why does Mendix require a specific entity to be chosen when defining a list input for a Java action? Is there a way to create a more generic Java action that can accept a list of any entity type and process it dynamically within the action?   I'm looking for guidance on how to achieve this or any alternative approaches that can help make Java actions more flexible in handling lists of different entities.   Thank you in advance for your insights and suggestions!   Best regards,   Kris
asked
1 answers
1

Because mendix is based on Java, it is strongly typed and for the container classes to work properly, a type needs to be specified. Like in Java, this can be a concrete type, or a template type. You will have to create a type parameter in the Type Parameter tab before you can use it though. Please see the screenshot below for more details:

 

Screenshot 2024-08-01 142626.png

answered