January 22, 2008

Flex Atom Reader in 13 lines of code



<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="feedRequest.send();">
<mx:HTTPService id="feedRequest" url="http://www.rjesh.com/feeds/posts/default" useProxy="false" />
<mx:Panel title="Rajesh Atom Reader" height="75%" width="75%" paddingTop="10" paddingBottom="10" paddingLeft="10" paddingRight="10">
<mx:DataGrid id="dgPosts" height="50%" width="75%" dataProvider="{feedRequest.lastResult.feed.entry}">
<mx:columns>
<mx:DataGridColumn headerText="Posts" dataField="title"/>
</mx:columns>
</mx:DataGrid>
<mx:TextArea id="txtarea" height="50%" width="75%" htmlText="{dgPosts.selectedItem.content}"/>
</mx:Panel>
</mx:Application>

3 comments:

  1. Useful code. Thanks for posting.
    ReplyDelete
  2. Simple and easy to understand, thanks for posting.
    ReplyDelete
  3. Thanks for the post. I looked over several posts that had code for an RSS/Atom reader using Flex. Yours was the only one that worked for me.
    ReplyDelete