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

050516_0045_custommetho1 ADF insert row programmatically

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

050516_0045_custommetho2 ADF insert row programmatically

Move the created method to Selected and click Ok

050516_0045_custommetho3 ADF insert row programmatically

 

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

050516_0045_custommetho4 ADF insert row programmatically

In the AppModule Wizard >> Select the method >> Click execute.

050516_0045_custommetho5 ADF insert row programmatically

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

050516_0045_custommetho6 ADF insert row programmatically

 

Now the method is available in data control palette. Drag and drop it to the JSF page to create button and commandlink

govindan ADF insert row programmatically
Connect me

Govind

Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

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 🙂
govindan ADF insert row programmatically
Connect me
Like us on Facebook.
Connect!