puremvc
|
 |
« Reply #1 on: March 27, 2009, 07:53:55 » |
|
Not a problem. Just as a form might send an event to its mediator saying it has domain data to send, a component with a grid could send an event saying the layout changed. Don't habve the mediator reach down into the component grabbing those props off the grid, though. That breaks the encapsulation of the component. Use a VO that the component populates with the values and the mediator grabs and hands off to a proxy for persistence. And visaversa, the proxy retrieves it, and sends it in a note to the mediator who sets it on the component. Internally you can apply those values by binding if you like, or by a method that does what you described, adding the columns to the grid.
Check the employee admin demo to see this happen with a user vo populatiing a form, etc. Check CodePeek and RSSReader which use DesktopCitizen to persist an AIR client's size and position info for some view state persistence juju.
-=Cliff>
|