Samples will show how to generate a Master-Detail form (in the same state) and that works pretty well, provided that Master & Detail are on the same page/state.
Separating the Master (datagrid) and Detail (form) by putting them in two different states does not work as well.
<s:CallResponder...> ... <valueObjects:MyDataType id="myDataType"/>
<fx:Binding source="masterDG.selectedItem as MyDataType" destination="myDataType"/>
<mx:DataGrid id="masterDG" includeIn="FirstState" itemClick="currentState='SecondState';" ... />
<mx:Form id="DetailForm" includeIn="SecondState" ... />
This is what happens...
DataGrid is populated, and an item is clicked, so the SecondState is show.
The detail-form is not populated - it's just blank.
I go back to the FirstState where the clicked item is now blank.
I click another item in the DataGrid.
Now the detail-form is populated properly.
Question: How can I initiate the DataGrid in the "Master Form" so that the "Detail Form" will be populated when clicking the first time?
Retrieving data ...