2 Replies Latest reply on Jan 11, 2008 1:44 PM by snafu7x7

    re-setting state of flex app on reload


      I have a flex app that allows the user to drill down through multiple levels. For example, imagine a shopping cart type application that allows you to shop for clothing. Obviously there are multiple selection points for filtering the product list down to what the user is actually interested in...you might have something like this:

      1)Choose 'Men' or 'Women'...app loads a different list of clothing categories depending on your choice (i.e. Men wouldn't have a 'Lingerie' category, Women wouldn't have a 'Ties' category, etc.). Say I choose 'Men'
      2)Choose a Main Clothing Category (e.g. Pants, Shirts, Shoes, etc.), Say I choose 'Pants'
      3)Choose a Secondary Clothing Category (e.g. Dress Pants, Khakis, Jeans, Cargo Pants). Say I choose "Cargo Pants"
      4)Choose a Color (e.g. Blue, Green, Black). Say I choose 'Green'
      5)Choose a Size (e.g. S, M, L, XL). Say I choose Medium.

      Each of these choices kicks off a Web Services call to populate the next set of choice points. After making it all the way thru I should have a unique collection of choices that gives me a product SKU and price point. Then the user can click a 'Buy' button which sends them over to another page for the store purchase. At this point the state of the Flex app will be lost.

      But what I can do is set a cookie or write some parameters to the url to maintain their 5 choices above. Then after the purchase I can send them back to the Flex app and 'theoretically' grab those values and then programmatically reset the state. The question is, how do I best accomplish this? I need to make a bunch of webservice calls in a synchronous matter to properly repopulate each step and I'm at a loss for how to even approach this. Can someone give me a good example of how to accomplish this?