Retrieve associated values in Java actions

0
Hello, I am trying to retrieve drop down value which is selected in the page using java action. This drop down is having 1-* association to main entity. I have below use case: I am able to retrieve member value "Name" of Entity1 using the below code: this.DataObject.getMember(this.TokenList.get(i).getContext(), this.TokenList.get(i).getToken().toString()).getValue(getContext())   However, I am NOT able to retrieve "Location" value which is associated with Entity1. can anybody tell me how can I get value of associated object Location from Entity1?  
asked
2 answers
0

Hi 

Check the below forum answer

https://community.mendix.com/link/space/app-development/questions/92126

answered
0

You will need to do an XPath Retrieve for Entity2 in your Java Action. The Mendix documentation gives a worked example of a similar use case to yours showing how to retrieve over the relationship between the two entities via XPath. 

 

https://docs.mendix.com/refguide/extending-your-application-with-custom-java/

 

Good luck!

answered