If you are new to Flex you can use a generic array collection to populate a datagrid without any major issues. They work fine. You can go back later and turn it into an array of typed objects if you encounter a situation where this is beneficial.
As for your question, the list of data sources is probably very small. I would send all the details into Flex with one call. It will be easier to code and I doubt you are going to noticably impact RAM usage or bandwidth by doing this. -Mike Chabot On Sat, May 17, 2008 at 3:15 PM, Dan Vega <[EMAIL PROTECTED]> wrote: > Here is what I am trying to do and it may make more sense. I have an object > coming back from ColdFusion that contains a list of datasource names. When > reading through the docs I can tell i need an arrayCollection or > XmlLIstCollection to use as the data provider. > > I also need to list the field names for each datasource underneath that so > should I just build that completely on the cf side before passing it back or > when the datasource + is clicked retrieve a list of field names. > > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" > creationComplete="init()"> > > <mx:Script> > <![CDATA[ > import mx.collections.ArrayCollection; > import mx.rpc.events.ResultEvent; > import mx.utils.ObjectUtil; > > [Bindable] > private var datasources:ArrayCollection; > > public function init():void { > AdminSrv.login("adminpassword"); > DataSourceSrv.getDataSources(); > } > > public function loginHandler(event:ResultEvent):void{ > trace(event.result); > } > public function getDataSourcesHandler(event:ResultEvent):void{ > var ds:Object = event.result; > trace(ObjectUtil.toString(ds)); > } > > ]]> > </mx:Script> > > <mx:RemoteObject id="AdminSrv" destination="ColdFusion" > source="cfide.adminapi.administrator"> > <mx:method name="login" result="loginHandler(event)"/> > </mx:RemoteObject> > > <mx:RemoteObject id="DataSourceSrv" destination="ColdFusion" > source="cfide.adminapi.datasource"> > <mx:method name="getDataSources" > result="getDataSourcesHandler(event)"/> > </mx:RemoteObject> > > <mx:HDividedBox top="60" right="20" left="20" bottom="20"> > <mx:Tree width="300" height="100%" dataProvider="{datasources}"> > </mx:Tree> > <mx:VBox width="100%" height="100%"> > </mx:VBox> > </mx:HDividedBox> > > > </mx:Application>

