Re: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS]
Hi Seth, Thanks for the quick reply Seems like the problem was a bug with BlazeDS. Like I mentioned, the custom objects inside of the collection (Country for example) are working fine just the custom collection type I created that was not. The did some digging in BlazeDS code and I verified that during serialization they were checking if the given instance was a Collection before Checking if it was Externalizable. On the trunk version of BlazeDS (3.0.1) this is already fixed and Externalizable is the first type checked during serialization. I hope they get 3.0.1 out soon. Thanks João From: Seth Hodgson [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Tuesday, November 25, 2008 4:13:43 AM Subject: RE: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hi João, Does your custom ActionScript collection class use [RemoteClass( alias=.. .)] metadata to map to your corresponding custom Java collection class on the server? Using [RemoteClass] requires that you have a hard dependency on this custom AS collection class in your app in order for mxmlc to generate the necessary registerClassAlias call during Flex app init; if you don't have an explicit variable of this type in your app, just create a dummy variable during startup that is thrown away and gc'ed and it should do the trick. Best, Seth From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Joao Kreuzberg Sent: Monday, November 24, 2008 12:37 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hello guys, I have a custom collection in Java and I'd like to bind it to my custom collection in Flex using AMF. I'm using BlazeDS. I implemented IExternalizable and Externalizable both ends but I still always get back a ArrayList instead of my custom implementation. The objects inside of the collection are bound correctly, only the collection that remains. Any hints about this? Regards, João
RE: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS]
Hi João, You can download the BlazeDS 3.2 release (milestone build) here: http://opensource.adobe.com/wiki/display/blazeds/download+blazeds+3 That should contain the fix you mention. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joao Kreuzberg Sent: Tuesday, November 25, 2008 12:16 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hi Seth, Thanks for the quick reply Seems like the problem was a bug with BlazeDS. Like I mentioned, the custom objects inside of the collection (Country for example) are working fine just the custom collection type I created that was not. The did some digging in BlazeDS code and I verified that during serialization they were checking if the given instance was a Collection before Checking if it was Externalizable. On the trunk version of BlazeDS (3.0.1) this is already fixed and Externalizable is the first type checked during serialization. I hope they get 3.0.1 out soon. Thanks João From: Seth Hodgson [EMAIL PROTECTED] To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Tuesday, November 25, 2008 4:13:43 AM Subject: RE: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hi João, Does your custom ActionScript collection class use [RemoteClass( alias=.. .)] metadata to map to your corresponding custom Java collection class on the server? Using [RemoteClass] requires that you have a hard dependency on this custom AS collection class in your app in order for mxmlc to generate the necessary registerClassAlias call during Flex app init; if you don't have an explicit variable of this type in your app, just create a dummy variable during startup that is thrown away and gc'ed and it should do the trick. Best, Seth From: [EMAIL PROTECTED] ups.com [mailto:[EMAIL PROTECTED] ups.com] On Behalf Of Joao Kreuzberg Sent: Monday, November 24, 2008 12:37 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hello guys, I have a custom collection in Java and I'd like to bind it to my custom collection in Flex using AMF. I'm using BlazeDS. I implemented IExternalizable and Externalizable both ends but I still always get back a ArrayList instead of my custom implementation. The objects inside of the collection are bound correctly, only the collection that remains. Any hints about this? Regards, João
RE: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS]
Hi João, Does your custom ActionScript collection class use [RemoteClass(alias=...)] metadata to map to your corresponding custom Java collection class on the server? Using [RemoteClass] requires that you have a hard dependency on this custom AS collection class in your app in order for mxmlc to generate the necessary registerClassAlias call during Flex app init; if you don't have an explicit variable of this type in your app, just create a dummy variable during startup that is thrown away and gc'ed and it should do the trick. Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Joao Kreuzberg Sent: Monday, November 24, 2008 12:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] [CUSTOM COLLECTION SERIALIZATION - BLAZEDS] Hello guys, I have a custom collection in Java and I'd like to bind it to my custom collection in Flex using AMF. I'm using BlazeDS. I implemented IExternalizable and Externalizable both ends but I still always get back a ArrayList instead of my custom implementation. The objects inside of the collection are bound correctly, only the collection that remains. Any hints about this? Regards, João