Hello,
I want to pass a java object which has an arraylist, this arraylist has another object added into it, through RemoteObject and blazeDS I am stuck at one place though. My java class has one ArrayList of Objects (which is another java class) (sorry in advance for long post however I wanted to make it clear) for example
Java class:
public class UserAccountDTO{
Private String loginID;
Private String name;
private ArrayList<AssignedFunction
DTO> assignedFunction;
&&&
&&..
//getter and setter method
//no args constructor
// constructor to set all these values from outside
Public UserAccountDTO(String loginID,String name, ArrayList assignedFunction){
this.setLoginID(loginID);
this.setName(name);
this.setAssignedFunction(a
ssignedFun
ction);
}
}
public class AssignedFunctionDTO(){
private int function_id;
private String function_name;
//getter and setter methods
//no args constructor
//constructor to set all these value from out side
}
Then the method which Remote Object service calls
Public loginUtil(){
//fetches user records from database
//creates arraylist of AssignedFunctionDTO by
assignedFunction.add(new AssignedFunctionDTO(functi
oned,funct
ionName);
//returns UserAccountDTO object by
Return new UserAccountDTO(loginID,nam
e,assigned
Funciton);
}
I am using blazeds for remoting and cairngorm for structure and created two DTO classes in flex like this:
Package;
{
[RemoteClass(alias=myPack
age.UserAc
countDTO)
]
Public class UserAccountDTO{
Public var loginID:String;
Public var name:String;
Public var assignedFunctaion:Object //I tried using AssignedFunctionDTO/ArrayC
ollection too
}
}
Package;
{
[RemoteClass(alias=myPack
age.Assign
edFunction
DTO)]
Public class AssignedFunctionDTO {
Public var function_id:int;
Public var function_name:String;
}
}
In my command class I am not getting value of AssignedFunctionDTO its null
I am doing : modelLocator.userAccountDT
O = event.result;
This gives me everything other then AssignedFunctionDTO dont know why, if I pass a simple arraylist I get its value, however I do not get value of ArrayList which contains another object inside it&I think I am missing something here however I have no idea about it&please bare with me... please help
Start Free Trial