Using attributes of ‘AnyObject’ in a Java action. - Mendix Forum

Using attributes of ‘AnyObject’ in a Java action.

15

It would be very handy if you could select the members (attributes) of the object you are passing into a java action.

 

Let’s say I have a Java action that has Parameter1 of type Anyobject (is already possible).

The second input, Parameter2 is an attribute of the object selected as Parameter1.

 

Currently, the only way to do this is using a String, provide the name of the attribute you want to use and access this using getMember(“GivenAttributeName”).

While it is a working method, it is prone to typos and renaming an attribute could break your code if you don’t update the String values as well.

 

Thanks,

 

John

asked
3 answers

Related ideas:
https://forum.mendix.com/link/space/java-actions/ideas/3951

https://forum.mendix.com/link/space/java-actions/ideas/2401

https://forum.mendix.com/link/space/java-actions/ideas/2109

 

Created

Exactly that Danny!

Created

Do you mean the same concepts as in widgets? When you select an Entity property that other attribute properties should be attributed of that property?

Created