ADF insert row programmatically
In this section, we will walk through about creating a custom method that inserts a record in Country table.
ADF insert row programmatically -started
In my ADF project, I have created EO and VO object of country table.The following method in the AppModuleImpl java class inserts a record in Country table
Exposé the Java Method
To make the method available to JSF page, we need to expose this java method. Follow the steps to expose the method
Double click on the AppModile.xml file >> Click on the tab Java >> Click the pencil icon
Move the created method to Selected and click Ok
That’s it. The method is exposed to UI client.
Test the AppModule
Before add this method to UI, We can test the exposed method. Right click on the AppModule and click Run
In the AppModule Wizard >> Select the method >> Click execute.
Now the method is executed in the background, and a record gets created in the Country table. Double click on the CountryEoView and check the record
Now the method is available in data control palette. Drag and drop it to the JSF page to create button and commandlink
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 🙂