Saturday, October 20, 2012

ADF BC : findByPrimaryKey Method Usage

Even though ADF provide lot of declarative way of achieving our goal , There are some instance where you need to write your own code.

Example If I need to write code that is generic to all VO then I will put that code in Application Module Implementation file.

Let us say we need to search employee based on employee id.

I wrote following code in ApplicationModuleImpl and exposed it to be called from user interface. I have given static value for employee but you can make it more generic according to requirement.

image

2 comments:

  1. thanks for this.....

    pls how do I call this method in my managed bean?

    ReplyDelete
  2. @Francis , if you want the client to be able to call it , you need to include the method in the Application module client interface , like the following :
    1-Select java panel of the Application Module .
    2-Select edit application module client interface.
    3-Shuttle the method from the available to the selected Pane, then click Ok.

    ReplyDelete