They don't, I have to convert Array to Vector. Actionscript's Vector is not perfect, element type has no inheritance, Vector.<Sprite> is Vector.<DisplayObject> will return false. and if a function accept parameter type Vector.<Sprite> won't accept Vector.<DisplayObject>.
So I think your @Vector should assign a type for each element, so that client can use directly. thanks. -Gary On Wed, Aug 21, 2013 at 10:08 AM, Franck Wolff <[email protected]>wrote: > Gary, > > GraniteDS has standard support for AS Vector ---> Java array (or any other > collection type) serialization. Java array (collections) ---> Vector needs > additional care: there is no mean to know what's the client application is > expecting, hence Java collections and arrays are serialized respectively > as ArrayCollection and Array... > > As a (bad, I admit) workaround, you can plug into GraniteDS a specific AMF3 > serializer that will override standard array/collection serialization to > get a vector on the Flex side. > > What we could certainly do is to add support for a specific Java annotation > (say @Vector) that will tell the serializer to send Vectors instead of > ArrayCollections / Arrays when it finds it on a bean property. I'm thinking > about something like: > > @Vector > private String[] stringArray; > > @Vector > private List<String> stringList; > > or even > > @Vector > public List<String> getStringList() { ... } > > I think it would be pretty easy to implement such feature and I can > certainly plan it for the next release (3.0.0.RC1). > > Since you seem to be using another server-side solution (BlazeDS / LCDS / > ?), how do they achieve AS Vector <---> Java array / collection > serialization? > > Franck. > > > 2013/8/21 Gary Young <[email protected]> > > > Quick question: Does GraniteDS 3 support Actionscript Vector <-----> > Java > > Array? > > > > > > On Wed, Aug 21, 2013 at 8:00 AM, Franck Wolff < > [email protected] > > >wrote: > > > > > Thanks Paul. > > > > > > The correct link is of course: > > > > > > > > > http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/(without > > > "*.*"). > > > > > > BTW: sorry for the double posts, I'm a bit confused with " > > > [email protected]" and the old "[email protected] > "... > > > > > > Franck. > > > > > > 2013/8/21 Paul Hastings <[email protected]> > > > > > > > On 8/21/2013 5:36 PM, Franck Wolff wrote: > > > > > > > >> http://granitedataservices.**com/blog/2013/08/20/graniteds-** > > > >> 3-0-0-m3-is-out/*.*< > > > > > > http://granitedataservices.com/blog/2013/08/20/graniteds-3-0-0-m3-is-out/*.* > > > > > > > >> > > > > > > > > your link is messed up a bit ("*.*"). > > > > > > > > > > > > > >
