Re: [flexcoders] Re: I'm missing something
This may be of help to you: http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html explains the usage of http service and gives example in both php and coldfusion. Outlines request, server side processing of response, and response return. Hope that helps. From: iloveyouwisconsin stpra...@gmail.com To: flexcoders@yahoogroups.com Sent: Sunday, February 8, 2009 12:00:04 PM Subject: [flexcoders] Re: I'm missing something --- In flexcod...@yahoogro ups.com, iloveyouwisconsin stpra...@.. . wrote: Maybe I'm just misstating my question or maybe I'm just not understanding. I'm just trying to make it so that the following PagableArrayCollect ion is populated dynamically (i.e. via an HTTPService) : [Bindable] public var myTest:PagableArray Collection = new PagableArrayCollect ion( [{label:AK , dataa:Alaska }, {label:AL, dataa:Alabama }, {label:AR, dataa:Arkansas }, {label:AZ, dataa:Arizona }, {label:CA, dataa:California }, ]); Does that make sense? I guess another way to say it is: How do I turn xml into a PagableArrayCollect ion?
Re: [flexcoders] Re: I'm missing something
I wouldn't try to turn XML into an ArrayCollection. Take a look at the XMLListCollection class. iloveyouwisconsin wrote: --- In flexcoders@yahoogroups.com, iloveyouwisconsin stpra...@... wrote: Maybe I'm just misstating my question or maybe I'm just not understanding. I'm just trying to make it so that the following PagableArrayCollection is populated dynamically (i.e. via an HTTPService): [Bindable] public var myTest:PagableArrayCollection = new PagableArrayCollection( [{label:AK, dataa:Alaska}, {label:AL, dataa:Alabama}, {label:AR, dataa:Arkansas}, {label:AZ, dataa:Arizona}, {label:CA, dataa:California}, ]); Does that make sense? I guess another way to say it is: How do I turn xml into a PagableArrayCollection? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] Re: I'm missing something
--- In flexcoders@yahoogroups.com, iloveyouwisconsin stpra...@... wrote: Maybe I'm just misstating my question or maybe I'm just not understanding. I'm just trying to make it so that the following PagableArrayCollection is populated dynamically (i.e. via an HTTPService): [Bindable] public var myTest:PagableArrayCollection = new PagableArrayCollection( [{label:AK, dataa:Alaska}, {label:AL, dataa:Alabama}, {label:AR, dataa:Arkansas}, {label:AZ, dataa:Arizona}, {label:CA, dataa:California}, ]); Does that make sense? I guess another way to say it is: How do I turn xml into a PagableArrayCollection?
RE: [flexcoders] Re: I'm missing something
Succesfully importing the package and declaring the variable typed as PagableArrayCollection should be all you need to do. Then as Jeffrey says, in a result handler, assign the results from your data service call to that var. Binding will do the rest Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of iloveyouwisconsin Sent: Saturday, February 07, 2009 6:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: I'm missing something --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Jeffry Houser j...@... wrote: You need to set the dataProvider on the DataGrid Somewhere in the resultHandler, do something like this: myTest = event.result.entry.rooms; Or you could give the DataGrid an id and do something like this: myDataGrid.dataProvider = event.result.entry.rooms; Well, I think normally that would do the trick. Since I'm using an .swc file (which does the pageable array), then don't I need to integrate it w/ that somehow?
RE: [flexcoders] Re: I'm missing something
Ah, ok. First, make sure you have set resultFormat=e4x. then, in the handler, use an e4x expression to return the XMLList containing your data. Loop over the list, and in each loop, create a new Object with the desired property=value pairs, and addItem(object) to the ArrayCollection. But, why not just use an XMLListCollection instead? No loop is required that way. Tracy Spratt Lariat Services Flex development bandwidth available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of iloveyouwisconsin Sent: Sunday, February 08, 2009 12:00 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: I'm missing something --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , iloveyouwisconsin stpra...@... wrote: Maybe I'm just misstating my question or maybe I'm just not understanding. I'm just trying to make it so that the following PagableArrayCollection is populated dynamically (i.e. via an HTTPService): [Bindable] public var myTest:PagableArrayCollection = new PagableArrayCollection( [{label:AK, dataa:Alaska}, {label:AL, dataa:Alabama}, {label:AR, dataa:Arkansas}, {label:AZ, dataa:Arizona}, {label:CA, dataa:California}, ]); Does that make sense? I guess another way to say it is: How do I turn xml into a PagableArrayCollection?
[flexcoders] Re: I'm missing something
--- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote: You need to set the dataProvider on the DataGrid Somewhere in the resultHandler, do something like this: myTest = event.result.entry.rooms; Or you could give the DataGrid an id and do something like this: myDataGrid.dataProvider = event.result.entry.rooms; Well, I think normally that would do the trick. Since I'm using an .swc file (which does the pageable array), then don't I need to integrate it w/ that somehow?
Re: [flexcoders] Re: I'm missing something
Not that I'm aware of. the DataGrid's dataProvider should work fine whether it is in a swc or the main project. iloveyouwisconsin wrote: --- In flexcoders@yahoogroups.com, Jeffry Houser j...@... wrote: You need to set the dataProvider on the DataGrid Somewhere in the resultHandler, do something like this: myTest = event.result.entry.rooms; Or you could give the DataGrid an id and do something like this: myDataGrid.dataProvider = event.result.entry.rooms; Well, I think normally that would do the trick. Since I'm using an .swc file (which does the pageable array), then don't I need to integrate it w/ that somehow? -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] Re: I'm missing something
Maybe I'm just misstating my question or maybe I'm just not understanding. I'm just trying to make it so that the following PagableArrayCollection is populated dynamically (i.e. via an HTTPService): [Bindable] public var myTest:PagableArrayCollection = new PagableArrayCollection( [{label:AK, dataa:Alaska}, {label:AL, dataa:Alabama}, {label:AR, dataa:Arkansas}, {label:AZ, dataa:Arizona}, {label:CA, dataa:California}, ]);