This is a follow up to a previous posting, but I have a
problem getting a complete bean graph from the client to the
server. I have set up a very simple test. I have the following:
public class OrgTest {
private long orgId = -1;
private Set locArr = new HashSet();
public Set getLocArr() {
return this.locArr;
}
public void setLocArr(Set locArr) {
this.locArr = locArr;
}
public long getOrgId() {
return this.orgId;
}
public void setOrgId(long orgId) {
this.orgId = orgId;
}
}
public class LocTest {
private String locName = null;
public String getLocName() {
return this.locName;
}
public void setLocName(String locName) {
this.locName = locName;
}
}
On the client I have:
[RemoteClass(alias="com.presidio.organization.OrgTest")]
public class OrgTest
{
function OrgTest() {
}
public var orgId:Number = -1;
public var locArr:ArrayCollection = new ArrayCollection();
}
and
[RemoteClass(alias="com.presidio.organization.LocTest")]
public class LocTest
{
function LocTest() {
}
public var locName:String;
}
I then create on the client and send it to the server.
var testOrg:OrgTest = new OrgTest();
testOrg.orgId = 222;
var loc:LocTest = new LocTest();
loc.locName = "HelpMe";
testOrg.locArr.addItem(loc);
var remote:RemoteObject = new
RemoteObject("userMasterService");
remote.checkOrganization(testOrg);
When it gets to the server, the locTest object in the
collection is NOT there.
IF I CHANGE THE JAVA OBJECTS TO USE A LIST and ARRAYLIST()
INSTEAD OF THE SET/HASHSET, it works.
ANY THOUGHTS? Please....
This should be pretty straight forward. I really want to use
sets so that the integration with Hibernate is easier.
Thanks,
Tom