Expand my Community achievements bar.

Java Flex Conversion

Avatar

Level 1
I have a java remote object which is very complecated, it has
arrays of other value object inside. How to create a AS file
equivalent to directly bind this type of java object. Eq



public class MyVO{

public MyObj1[] myObj1;

public MyObj2[] myObj2;

}



Is it possible to bind directly the above java object to a
flex value object?
1 Reply

Avatar

Level 2


Yes, you can have three entities:



[RemoteClass alias="com.java.MyVO"]

public class MyVO

{

}



[RemoteClass alias="com.java.MyObj1"]

public class MyObj1

{

}



[RemoteClass alias="com.java.MyObj2"]

public class MyObj2

{

}



In the constructor for MyVO, go through all elements of
MyObj1 and MyObj2 and cast them to their respective types.



If you use the Data Management Service with LCDS, it's event
better.



Object composition can be handled with managed associations.