myFeedz in a FlexBook

Posted on March 15, 2007 | 9 comments

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.

  • Dave

    I get a jason decode error when I click on search button.

  • http://www.renaun.com Renaun Erickson

    What search term are you using? The “flex” term does not throw a error for me (as of a couple minutes ago).

  • Thiagu

    Can you post the source code pls !!

  • http://www.renaun.com Renaun Erickson

    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:

                    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;
  • Dave

    Working now.

  • http://www.renaun.com Renaun Erickson

    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.

  • http://weblog.mrinalwadhwa.com Mrinal Wadhwa

    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()

    ***********************************************************************

  • http://www.renaun.com Renaun Erickson

    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.

  • Pingback: myFeedz Development Blog » Blog Archive » Browse articles using myFeedz and FlexBook

  • Bruce

    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