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

Using attributes of ‘AnyObject’ in a Java action.


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.





3 answers

Related ideas:



Exactly that Danny!


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?