What I was doing was passing the VO into the component like:
exampleComponent.exampleVO = arrayCollectionExample[dataGrid.selectedIndex];
This was doing what I wanted, set the component VO to the selected VO. Worked great.
Now the problem I ran into was when I updated the VO and an error occurred. Although it wasn't updating in the database, the datagrid was updated. The item was binded I believe.
To corrected this I found this ObjectUtil.copy().
exampleComponent.exampleVO = ObjectUtil.copy(arrayCollectionExample[dataGrid.selectedIndex]) as exampleVO;
It worked for me and there was no more binding to the data grid. :)
No comments:
Post a Comment