[flexcoders] Re: Having problems iterating ResultSet returned to Flex via Blaze
I don't use Java or BlazeDS but when I get data from PHP via AMF, I usually send back an array of objects. On the Flex side I do this: datagridArrColl = new ArrayCollection(ArrayUtil.toArray(event.result)); myDatagrid.dataProvider = datagridArrColl; --- In flexcoders@yahoogroups.com, tim...@... tim...@... wrote: I'm currently returning a SQL ResultSet from my Java class via Blaze to Flex and I'm trying to figure out how to bind for example a datagrid directly to the ResultSet object in Flex or iterate through it and then bind to the result. If anybody could point me in the right direction I'd greatly appreciate it! Thx, Tim.
Re: [flexcoders] Re: Having problems iterating ResultSet returned to Flex via Blaze
thx for the response...I've actaully tried this approach with no success... Also, it seems that Blaze passes back an ObjectProxy and from what I gathered online you should be able to use the ArrayUtil.toArray against this as well, which I also tried unsuccessfully... For now, I'm passing a List back from java after iterating through the ResultSet in my java class. On Thu, Jul 16, 2009 at 9:56 AM, valdhor valdhorli...@embarqmail.comwrote: I don't use Java or BlazeDS but when I get data from PHP via AMF, I usually send back an array of objects. On the Flex side I do this: datagridArrColl = new ArrayCollection(ArrayUtil.toArray(event.result)); myDatagrid.dataProvider = datagridArrColl; --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, tim...@... tim...@... wrote: I'm currently returning a SQL ResultSet from my Java class via Blaze to Flex and I'm trying to figure out how to bind for example a datagrid directly to the ResultSet object in Flex or iterate through it and then bind to the result. If anybody could point me in the right direction I'd greatly appreciate it! Thx, Tim.
[flexcoders] Re: Having problems iterating ResultSet returned to Flex via Blaze
So, if you put a breakpoint in your resultEvent function, what does the event.result data look like? What does Charles (http://www.charlesproxy.com) show as the data? Perhaps you could post some screen shots of both? --- In flexcoders@yahoogroups.com, Tim Finlayson tim...@... wrote: thx for the response...I've actaully tried this approach with no success... Also, it seems that Blaze passes back an ObjectProxy and from what I gathered online you should be able to use the ArrayUtil.toArray against this as well, which I also tried unsuccessfully... For now, I'm passing a List back from java after iterating through the ResultSet in my java class. On Thu, Jul 16, 2009 at 9:56 AM, valdhor valdhorli...@...wrote: I don't use Java or BlazeDS but when I get data from PHP via AMF, I usually send back an array of objects. On the Flex side I do this: datagridArrColl = new ArrayCollection(ArrayUtil.toArray(event.result)); myDatagrid.dataProvider = datagridArrColl; --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, timfin@ timfin@ wrote: I'm currently returning a SQL ResultSet from my Java class via Blaze to Flex and I'm trying to figure out how to bind for example a datagrid directly to the ResultSet object in Flex or iterate through it and then bind to the result. If anybody could point me in the right direction I'd greatly appreciate it! Thx, Tim.