Futurescale, Inc. PureMVC Home

The PureMVC Framework Code at the Speed of Thought


Over 10 years of community discussion and knowledge are maintained here as a read-only archive.

New discussions should be taken up in issues on the appropriate projects at https://github.com/PureMVC

Show Posts

| * |

  Show Posts
Pages: [1]
1  Announcements and General Discussion / Getting Started / Flex Tree control, Proxy and VOs on: May 24, 2008, 05:37:07
Hi,

I am building my first Flex/PureMVC application to get a nice picture of the framework.

I don't find simple information about how I could represent a tree structure in my model...

I found examples of proxies manipulating simple VO as their "data", or ArrayCollection, but how could I manipulate (in proxy I suppose) and store (in proxy's data) a tree of objects.

My sample is quite simple: represent a shop, with products arranged in categories.
The tree is a set of categories, each category can contain subcategories and/or products.

[DVD]
  [Drama]
    .National treasure
    .The walker
  [Animation]
    .Toy story
[Books]
  .Learning AS3
  .Design Patterns

I suppose my Proxy would expose methods like getCategories, getProductsForCategory, etc... These methods returning stuff from the data var of the proxy.

Last but not least, I have a Tree control in my view component. How can I use Bindable to fill my Tree control with the data retreived by the mediator (through a notification sent by my proxy) ?


(don't forget I am not yet familiar with the framework)

Thanks for any response,

--
Mathieu
Pages: [1]