Passing a XMLListCollection between views in ViewStack in Flex

122 Views Asked by At

I have a problem that I have no idea to resolve it. In my application, I have a ViewStack with 2 children.

In the first view of the ViewStack, I have a datagrid with a XMLListCollection as dataprovider. In this view, user chooses a record from the datagrid then he passes to the second view.

In the second view, all the data chosen from the record will be loaded into different textInputs for modification.

My problem is, how can I pass these data from one view to another in ViewStack. I have done a search for the answer in this forum but no thread responses to my question.

All replies will be highly appreciated.

Thanks and best regards, LE Hai-Binh

1

There are 1 best solutions below

0
On

You can use Event handling mechanism. When you select a record in datagrid (in first child of Viewstack), create an Event object and put all the data into it and dispatch it. On the second child of Viewstack write a listener of this event. In the listener method extract the data from Event and do whatever you want to do with the it.