Hello,
I am in the process of creating an end-to-end sample solution using the
Flex/Cairngorm framework, J2EE solution with Apache Xfire/CXF. Later I want
to apply the Acegi security and may be CAS for SSO.
The solution I am doing is built on/enhanced from the standard
CairngormStore 2.2.1 and I am using flex builder 3.0 beta 2.0
I converted the Java side to a standalone J2EE application with CXFServlet
and I have exposed the CreditCard and ProductInfo services as the CXF
webservices.
I have modified the Services.mxml to use the webservice instead of the FDS.
When I get the web service result, all my product vo's are coming in as an
ArrayCollection of mx.utils.ObjectArray. Is there an easy way to convert
them (the object proxy) to an array of ProductVO?
I am now looping to do the same, I am pretty sure there got to be some
standard/better way then the following:
var arrayResult:ICollectionView = ICollectionView( event.result
);
var cursor:mx.collections.IViewCursor =
arrayResult.createCursor();
while (!cursor.afterLast)
{
var product:ProductVO = new ProductVO();
product.description = cursor.current.description;
product.id = cursor.current.id;
product.image = cursor.current.image
product.name = cursor.current.name;
product.price = cursor.current.price;
product.thumbnail= cursor.current.thumbnail;
productsArray.addItem(product);
cursor.moveNext();
//var product:ProductVO = cursor.current.object as ProductVO;
productsArray.addItem(product);
cursor.moveNext();
}
Any ideas will be appreciated!
Thanks
Matt
--
View this message in context:
http://www.nabble.com/Flex-Cairngormstore---WebServices-ArrayCollection-of-ObjectArray-tf4673670.html#a13352593
Sent from the FlexCoders mailing list archive at Nabble.com.