Thanks for the reply Seth.
I am now able to send an ArrayCollection of my custom class Chart:
[Bindable]
[RemoteClass(alias="factory.data.Chart")]
public class ChartObject
{
private var name:String;
private var axisList:ArrayCollection;
public function getAxisList():ArrayCollection {
return axisList;
}
}
And I can read the array in the java message handler, and it even detects the
objects in
the array as Charts but when I try to get the axisList array from within Chart,
it comes up
as null. The axisList is an array of objects from another custom class I have
called Axis.
Here is a sample of the java Chart class for reference:
public class Chart {
//import mx.collections.ArrayCollection;
//import mx.controls.Image;
public String name;
public ArrayList axisList;
public ArrayList getAxisList() {
return axisList;
}
--- In [email protected], "Seth Hodgson" <[EMAIL PROTECTED]> wrote:
>
> You can send any type of data as the body of a message. If you want to send
> an instance
of a typed class, be sure to include [RemoteClass(alias="your.java.Class")]
metadata in
your ActionScript class so that the Player serializes it with type info and the
server can
deserialize it to your desired type.
>
> Seth
>
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of
netdeep
> Sent: Friday, May 09, 2008 7:21 AM
> To: [email protected]
> Subject: [flexcoders] Sending data to the Server
>
> I need to send data to the server. Up til now I've been using messaging. But
> as far as I
can
> tell, I can only send strings this way.
>
> What other alternatives are there? For instance, I would like to be able to
> send an array
or a
> custom data structure. I'm using Java for the backend. Ideally I would not
> want to launch
a
> new RemoteObject for each send from Flex, but instead have a persistent
> listener to
hear all
> requests (which is why I initially chose messaging and created a channel for
> the java
message
> manager to listen to).
>