I have a custom java class which has an ArrayList and corresponding to it have a custom vo class which has ArrayCollection (in Flex).
I want to return data from Java to flex. Every variable in java is getting mapped to vo perfectly except for ArrayList.
When trying to retrive
When trying to retrive exposureUSDList (which is an arrayList) in flex I am getting empty ArrayCollection. It is not getting mapped properly
Please find my code below:
Flex Code:
package com.example.vo
{
import com.adobe.cairngorm.vo.IValueObject;
import mx.collections.ArrayCollection;
[Bindable]
[RemoteClass(alias="com.example.vo.Summary")]
public class Summary
{
public var productId : String;
public var clientId : String;
public var brokerId : String;
public var acctNo : Number;
public var exposureUSDList:ArrayCollection=new ArrayCollection();
}
}
Java code:
package com.example.vo;
import java.io.Serializable;
import java.util.ArrayList;
public class Summary implements Serializable {
static final long serialVersionUID = -1L;
private String productId ;
private String clientId ;
private String brokerId ;
private String acctNo ;
private ArrayList exposureUSDList= new ArrayList();
public String getProductId() {
return productId;
}
public void setProductId(String productId) {
this.productId = productId;
}
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getBrokerId() {
return brokerId;
}
public void setBrokerId(String brokerId) {
this.brokerId = brokerId;
}
public int getAcctNo() {
return acctNo;
}
public void setAcctNo(int acctNo) {
this.acctNo = acctNo;
public ArrayList getExposureUSDList() {
return exposureUSDList;
}
public void setExposureUSDList(double exposureUSD) {
this.exposureUSDList.add(exposureUSD);
}
}
Please Help!!