So in Flex 1.5 I would say that you’re better off using value objects because the XML objects in Flex 1.5 are not that flexible for display in a DataGrid.  But with Flex 2 the answer is: use XML by all means, that’s what e4x is for!  Unfortunately you can’t do it in the alpha quite yet, but in the next build you’ll see the XMLListCollection which can be used for all of the cases you mentioned:

 

1)       myDG.dataProvider = new XMLListCollection(event.result.prices);

2)       myDG.dataProvider = new XMLListCollection(event.result.shops);

3)       myDG.dataProvider = new XMLListCollection([EMAIL PROTECTED] < 200]);

 

Neat huh?

 

Matt

 


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Alberto Albericio Salvador
Sent: Monday, October 17, 2005 3:50 AM
To: [email protected]
Subject: [flexcoders] Data service results format: VO or XML?

 

Hello all,

I have read some posts on how to pass data from the service tier to the
Flex tier using VOs or arrays of VOs. I dont think it is a bad idea to
use these objects but:

Is it possible to return results in XML format and then bind parts of
this XML "document" to Flex UI components like a datagrid, list, etc?

This would be something like :
    // not real code
    1) myDg.dataProvider = event.result.getElementsByTagName("prices")
       and then:
        columnName="PRICE"
        colomnName="another attr or subelement"
       ...
    2) myList.dataProvider = event.result.getElementsByTagName("shops")

and even more advanced :

    3) myDg.dataProvider = event.result/[EMAIL PROTECTED] < 200]

Thanks all

--
Alberto Albericio Salvador
Aura S.A. Seguros
Departamento Informática




--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to