434 total views, 7 views today
ADF delete row programmatically
In this section, I have explained deleting a record from an ADF table programmatically. I have used the Country table in HR schema for this example.
ADF delete row programmatically – Started
In my ADF model project, I have created EO and VO of the country table. The following methods in the AppModuleimpl java class will delete the selected row and first record
removeCurrentRow() => removes the record the user is viewing at the time .
removeFirstRow() => Removes first record in the table
Expose this method
We need to expose this method to make it available for UI. The below step is doing the same.
Double click on the AppModule.xml file >> Click Java >> Click the pencil icon >> Drag that method to the selected column as shown below & click Ok
1. Right click the APpModule.xml and click Run
2. An appmodule wizard appears on the screen. Double click on the CountryEOView1 object. You will get the Argentina as the record loaded on the screen similar to below
3. Double click on the AppModule >> Select removeCurrentRow() >> click execute . The Argentina is the current record you are viewing got deleted.
4. To check this, double click the CounryEOView1 again, you will see Australia is loaded and no more Argentina
Double click on the AppModule >> Select method removeFirstRow >> Click Execute. You will get the below error pop up saying about the foreign key violation because the record has been used by some other table.
The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.
Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply 🙂
Latest posts by Govind
- How to encode and decode base64Binary datatype in Oracle BPEL - December 11, 2017
- How to Read a File using Oracle BPEL File Adapter Example - December 11, 2017
- How to write a File using Oracle BPEL File Adapter Example - December 10, 2017