Peter,
Here is the serverAPI,
public class Parent implements Serializable {
private String property;
private Set childs;
have here get/set methods
}
public class Child implements Serializable{
private String property;
private Parent parent;
with get/set methods
}
I have a one-to-many relation between the Parent and the Child, implemented as "Set" on Parent. The "Child" has a reference back to the Parent via "parent" property. I suspect AMF serialization doesn't work with cyclical reference. As I mentioned there is no problem sending Parent object from the client side to the server side.... but then I want to persist the "Child" object it looks that his "parent" property is like a new instance of the Parent class ( all Parent's properties are initialized with Java default values, in my case null;).
Is this an AMF limitation?.
I checked the object integrity logging the properties values to JBoss's log. Flex alert display the right value, but unfortunately don;t get the same value object on the server side.
Any suggestions?
Thanks,
Valy
Thank you,
Valy
Peter Farland <[EMAIL PROTECTED]> wrote:
Here is the serverAPI,
public class Parent implements Serializable {
private String property;
private Set childs;
have here get/set methods
}
public class Child implements Serializable{
private String property;
private Parent parent;
with get/set methods
}
I have a one-to-many relation between the Parent and the Child, implemented as "Set" on Parent. The "Child" has a reference back to the Parent via "parent" property. I suspect AMF serialization doesn't work with cyclical reference. As I mentioned there is no problem sending Parent object from the client side to the server side.... but then I want to persist the "Child" object it looks that his "parent" property is like a new instance of the Parent class ( all Parent's properties are initialized with Java default values, in my case null;).
Is this an AMF limitation?.
I checked the object integrity logging the properties values to JBoss's log. Flex alert display the right value, but unfortunately don;t get the same value object on the server side.
Any suggestions?
Thanks,
Valy
Thank you,
Valy
Peter Farland <[EMAIL PROTECTED]> wrote:
Can we see the server API for these types too?When you say a Child's parent property is empty, are you saying it is null on the server? What are you using to determine that?Hi Flexcoders,
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Valy Sivec
Sent: Tuesday, January 03, 2006 2:11 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Flex 1.5: AS2 serialization issue . Parent/Child data model implementation
I have a master/detail data entry form and I have some difficulties transfering the data objects from AS2 to the server side. The data persitence is implemented with Hibernate and I have a one to many relations between a Parent object and his Child(s) objects.
Here is the AS2 implementation of the data model:
class Parent
{
public static var regClass = Object.registerClass("Parent", Parent);
public var property : String;
public var childs : Array = new Array();
public function Parent() {}
}
class Child
{
public static var regClass = Object.registerClass("Child", Child);
public var property : String;
public var parent : Parent;
public function Child() {}
}
Here is my problem: It looks that when I transfer the Child object from AS2! to Java via Remote Object call, the "parent" property is empty ( Parent's properties are initialized to the default values ) on the server side no matter what value I have on the AS2 side. Is there any issue with the serialization from AS2 to JAVA in this case?.
I transfer the Parent object from AS2 to JAVA and everything is OK.
Thank you,
Valy
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
Yahoo! Shopping
Find Great Deals on Holiday Gifts at Yahoo! Shopping
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Web site design development | Computer software development | Software design and development |
Macromedia flex | Software development best practice |
YAHOO! GROUPS LINKS
- Visit your group "flexcoders" on the web.
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.