I am trying to export the data which is an arrayCollection in Flex to Excel. I followed this article, http://viconflex.blogspot.com/2007/02/export-data-from-flex-app-using.html, and got all the components working. Now the last step is to make the data (arrayCollection) available in #arguments.data#, I guess.
I am very new with ColdFusion. I have used Flex for awhile with Java as the backend. I appreciate it if you can help me to resolve this last step. Thank you very much. Faye Larson Dallas >Faye, > > > >Obviously, I don't know exactly what you're trying to do, but here's a >pretty good guess: the real point is to export some customer data as an >Excel file. > >So you probably want another CFC (call it a "service" component), perhaps >called CustomerService.cfc. > >In there you may have a method called "exportCustomerData," which might >possibly take some arguments, such as a Customer Type, a date range, or >other filtering mechanisms. > >The CustomerService would call a method on CustomerGateway that retrieves >the query data. While the gateway *could* build the struct, you generally >want to leave that sort of work to another component, using the gateway >strictly for database interaction. So perhaps the gateway's method is just >"GetAll" (or whatever's appropriate, depending on whether you need to apply >filters in the query), and you build the struct (or array, or just leave it >as a query, depending on what you need), in the CustomerService. > >Then the CustomerService calls the Export.cfc's method, and does whatever's >necessary - saving the spreadsheet, returning it to the browser, whatever. > >Unless you have a reason to persist the query data from request to request, >you don't want or need to place it in the session scope. > >So: > > > 1. Request calls method on CustomerService, optionally with filter data. > 2. CustomerService calls CustomerGateway to get data, optionally with > filter. > 3. CustomerService manipulates data into what array/structure/etc. you > want (this could even be done by some sort of utility cfc) > 4. CustomerService call Export.exportToExcel(data), passing in the data > it has manipulated. > 5. CustomerService completes its action by returning the filename of the > spreadsheet, or whatever's appropriate to your needs. > > >From there on, it kinda depends on what you want to do with the spreadsheet. > > >-- >Thanks, > >Tom > >Tom McNeer >MediumCool >http://www.mediumcool.com >1735 Johnson Road NE >Atlanta, GA 30306 >404.589.0560 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340580 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

