29 May, 2012

Checking Data Changes in ADF


Sometimes you want to check about data changes in attributes which exposed in data control only.
You can use below code

     DCBindingContainer dcBCon = 
         (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();  
     if (dcBCon.getDataControl().isTransactionModified()) {  
       //commit the transaction  
       dcBCon.getDataControl().commitTransaction();  
     }  

I used DCDataControl.isTransactionModified() method to check about data changes.
I used DCDataControl.commitTransaction() method to commit data changes in transaction.

Thanks
Mahmoud A. El-Sayed

No comments:

Post a Comment

How to Pass Parameters to ActionListener in ADF

In some cases, it is required to pass a value to ActionListener of ADF Button. The method that can be invoked by actionListeners has only...