Flex2: Populate ComboBox from RSS
Starting out in Flex development, one of the "simplest" things I wanted to do is to populate a ComboBox with values from an RSS feed (XML). Surprisingly enough, despite all the Flex documentation available, i had a hard time finding exactly how to do it.
So here it is for those who may be looking for something similar:
Note that the key is specifying the "labelField" property for the combobox. The below will not work:
So here it is for those who may be looking for something similar:
<mx:HTTPService id="feedRequest"
url="http://www.megaszu.com/photoblog/rss.asp"
useProxy="false" />
<mx:ComboBox
dataProvider="{feedRequest.lastResult.rss.channel.item}"
labelField="title" />
Note that the key is specifying the "labelField" property for the combobox. The below will not work:
<mx:ComboBoxTake a look at the actual feed to see its structure.
dataProvider="{feedRequest.lastResult.rss.channel.item.title}" />
Labels: flex


0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home