Wednesday, November 3, 2010

ADF Model - Beginner: Exposing AMImpl methods as client interface

If you're using ADF BC, you would write your application logic in AMImpl methods in model project. But, if you want to use/call these methods in UI project, you should generate client interface for these methods. Here, let me show how to do that.

For example let's take a DemoAMImpl has two methods 'getAllDepts' and 'getEmployeesInDept', to expose them in client's interface, follow the below steps:

 1. Open application module DemoAM -> Click on 'Java' tab -> Click on 'Edit'(pencil) icon beside the 'Client Interface' section.

2. In the 'Edit Client Interface' section, shuffle the methods you want to expose th right side and click 'OK'.


3. Now, you can see the added methods under the 'Client Interface' Section.

4. Now, if you expand the 'Data Controls' palette, you can see the newly added methods there so that you can drag and drop them into your UI project task flows or you can add them as methodAction bindings in pagedef.

Sample method binding in task flow:

3 comments:

Related Posts with Thumbnails