How to get values from Mendix Object

0
Hi Team, Can someone help me to get an idea on how to get values from Mendix Object, In JavaAction I am trying to get values from mendix object below the example code for (IMendixObject iMendixObject : Results) { //Note-Results has been retrived from xpath query.                     strList = new ArrayList<String>();                     IMendixObject obj = iMendixObject;                     //This obj has tables value (like name=mxobjectmember, id=mxobjectmember, etc)                     // need to get the values from this obj (like name , id ,etc and store in variables )
asked
2 answers
2

Hi Sravani,

You might wanna have a look at this question,

https://forum.mendix.com/link/space/java-actions/questions/99401

It may clear your confusion,

 

Hope It helps!!

answered
0

Mendix will always create a Java proxy class to allow you to easily access attributes in a Mendix Object.

If you have a module called MyModule, with an entity called MyEntity, and a String attribute called MyAttribute, then in your javasource folder you’ll have a mymodule/proxies/MyEntity.java proxy file. These will have getters and setters for all attributes inside.

To get the value of MyAttribute from an instance of MyEntity, you can use something like

String myAttribute = myEntity.getMyAttribute();


I hope this helps.

answered