This content has been marked as final. Show 3 replies
First, put the dataProvider at the application level. Create a var at that level to hold the selectedItems array, say _aSelectedItems. Before closing the popup, set:
_aSelectedItems = myList.selectedItems;
Next time the popup is opened:
selectedItems = _aSelectedItems;
What if the data provider is NOT at the root, but in a component?
In my root app, I have an MXML component referenced (id="s1"). It's THAT component that's calling the popup and contains the dataProvider.
How does the window refer to the component that called it? I'm trying to leave this generic, rather than specific, so I can use the same popup component several places in the app.
There are multiple components (s1, s2, s3 etc) that call this window, and I keep the dataProviders in each of these components. So the window needs to be able to "find" the _aSelectedItems relating to the screen that "celled" it.