Creating Data Entry Page through Operations Bindings in ADF

This article provides insights into creating data entry page through Operations Bindings in ADF.

Follow below link  and create a page  but don't drag  buttons
https://oracleerplearning.blogspot.com/2017/10/creation-of-data-entry-page-in-adf.html

Once page is created, add two buttons. As shown in below screenshot I have added two buttons namely Create New Record and Save  
















Now create Action listener on two buttons in a manage bean java class.

Once java class is created, then the next step is to create Action binding by following below screenshots






















1. For the operation, CreateInsert  create an operation binding  as shown in screenshot







2. For the operation, Commit create an operation binding  as shown in screenshot


























Once binding created,  build a code in managebean to call operating bindings. Take a reference out of below code snippet



package tgr.oracle.apps.fnd.DataEntryApp;

import javax.faces.event.ActionEvent;

/* Binding classes to be imported */
import oracle.adf.model.BindingContext;
import oracle.binding.BindingContainer;
import oracle.binding.OperationBinding;
/* Binding classes to be imported */
public class ManageBean {
    public ManageBean() {
    }


// Bindings declaration 
    BindingContext bctx =BindingContext.getCurrent();
    BindingContainer bc=bctx.getCurrentBindingsEntry();

// Create New Record button code 
    public void CreateRecord(ActionEvent actionEvent) {
        // Add event code here...
      
        OperationBinding ob =bc.getOperationBinding("CreateInsert");
        ob.execute();
    }

// Save button code      public void SaveBtnEvt(ActionEvent actionEvent) {
        // Add event code here...
       
        OperationBinding ob =bc.getOperationBinding("Commit");
        ob.execute();
        
    }




}


Run the page from Jdeveloper  and click on Create New Record button to add the new record and save it



Verify the newly inserted record in database







Comments

Popular posts from this blog

Sample HZ API's script to Create Contacts and Contact Points in Oracle

REST integration built-in OIC to read Large files with size more than 10MB