myFeedz in a FlexBook
March 15th, 2007
Ely Greenfield’s Flex Book component is easy to use. I went ahead and made a myFeedz mashup, where you can read a list of posts as a book. Check it out here!
Over all the FlexBook component was quite easy to use. It took me a bit to find that the “content” attribute is the method of assigning a dynamic Array of child components to the book, which is nice to use after finding it out. Ely went to the lengths of making many useful Style attributes as well as specific Front cover and Back cover page options. I still have explored the whole class but with just this first example the class looks quite extensive.
Entry Filed under: Adobe Flex, Rich Internet Applications



10 Comments Add your own
1. Dave | 2007-03-15 at 8.52 am
I get a jason decode error when I click on search button.
2. Renaun Erickson | 2007-03-15 at 9.13 am
What search term are you using? The “flex” term does not throw a error for me (as of a couple minutes ago).
3. Thiagu | 2007-03-15 at 9.26 am
Can you post the source code pls !!
4. Renaun Erickson | 2007-03-15 at 9.44 am
It needs a clean up pass before I do that. The myFeedz code you can get from my other post:
http://renaun.com/blog/2007/02/16/184/
As for the FlexBook code this is the code for that part:
[code]
var posts:Array = new Array();
try{
posts = JSON.decode( returnValue ).posts;
for each( var post:Object in posts ) {
var newPage:BasicPage = new BasicPage();
newPage.post = post;
pages.push( newPage );
}
status = “Found ” + pages.length + ” posts, book has been created!”;
} catch( error:Error ) {
Alert.show( “There was an issue in the JSON decode, try another search”, “Decode Error” );
status = “Decode Error, try seaching for something else.”;
}
myFeedzBook.content = pages;
[/code]
5. Dave | 2007-03-15 at 10.42 am
Working now.
6. Renaun Erickson | 2007-03-15 at 10.49 am
The JSON decode error was being thrown when the myFeedz return no results. So I fixed that. It also looks like myFeedz search tag is pretty strict, I’ll have to look into the API to make search pick up more items.
7. Mrinal Wadhwa | 2007-03-23 at 1.55 am
Hey Renaun,
I’m still seeing an error:
*******************************************************************
[RPC Fault faultString="Error #1090: XML parser failure: element is malformed." faultCode="Client.CouldNotDecode" faultDetail="null"]
at mx.rpc.http::HTTPService/http://www.adobe.com/2006/flex/mx/internal::processResult()
at mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::DirectHTTPMessageResponder/completeHandler()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
***********************************************************************
8. Renaun Erickson | 2007-03-23 at 7.03 am
What term did you search on? I found out at ApolloCamp there might be a way to access the raw value that is returned by the HTTPService call instead of decoding the HTTPService converted result.
9. myFeedz Development Blog &hellip | 2007-03-28 at 1.06 am
[...] Renaun Erickson has created a mashup using the myFeedz API and Ely Greenfield’s FlexBook component. Check it out! It’s an interesting proof of concept, although it cannot compete with the Fresh sample application for the newly-released Apollo. But then again, Fresh is an RSS reader, while myFeedz is an RSS leafer. [...]
10. Bruce | 2007-04-10 at 5.50 pm
I’m building a Flex app that uses Ely’s FlexBook component. Would you make your code available? I not clear how to create an array of child components (where each child component has specific values). I saw the excerpt of your code above where you assign the pages array to the content attribute of the FlexBook, but I need to see the code for the BasicPage child component to understand how you create the array.
Bruce
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed