The typical example.
You have a datagrid that is bound with an arraycollection, which source is 
managed by LCDS via ds.fill().
your datagrid is editable. The user edits a value in the collection and you 
fire a commit. (ds.commit()).

Let say you are using a custom assembler. The 
updateItem(newVersion,prevVersion,changesList) method will be invoked. 
There assuming something goes wrong and you call:
DataServiceTransaction.getCurrentDataServiceTransaction().setRollbackOnly();

I can see the db rolling back no problem. But my client did not get any 
notification! 
I have callback functions in the commit, and I have event listener on the ds 
(fault and result) AS such:

_dataService.commit();
token.addResponder(new AsyncResponder(
   function onAsyncResult(result:Object, token:Object = null) : void
   {
   }
   function onAsyncFault(.../...)
)

AND, 

_dataService.addEventListener(DataServiceFaultEvent.FAULT, this.onFault, false, 
0, true);
                                
_dataService.addEventListener(ResultEvent.RESULT, this.onResult, false, 0, 
true);

NONE of these callbacks get called. So I basically have no way of knowing that 
a rollback happened, and the user datagrid is still showing the wrong value, 
since the commit failed. Any idea?

Note that however when an exception is thrown on the server (updateItem() 
method), I do indeed get a callback via the AsyncFault method. 

Thank you.


Reply via email to