Use Case: We have an Entity that is Passed into a Java Action. Inside the Action we clone this Object, some Magic happens, and some Attributes will be Changed on the new Object using the SetValue Java (IMendixObject)Method. After we return the New Object to the “MX Context” the changes are Lost, the Members are still having the Values of the Original Object PseudoCode (executeAction): → JAVA CONTEXT MyType newObject = MyType .initialize(userContext, originalObject.getMendixObject()); IMendixObject newMendixObject = newObject.getMendixObject(); log(newMendixObject.getValue(“attrName”); // Will Print oldValu newMendixObject .setValue(userContext, “attrName”, “newValue”); // Apply the Changes log(newMendixObject.getValue(“attrName”); // Will Print newValue return newMendixObject; → MX Context The Returned Object still has the values of the Original Object and not the newValue
↧