In ADF there are many operations to perform of various functionality. To fulfill user requirement, we need to create custom operation. Now I will describe how to create custom operation .
Step 1: create a function into ApplicationModuleImp Class.
String getHelloMsg(){
String msg=”Hello”;
return msg;
}
Step 2 Open AppModule -- > java --> client Interface then shuttle this function.
Step 3: From your Data Control you drug your function in the page and right click on your function and select button.
Step 4: Right-click in the generated button then choose "Create Method Binding For Action" then create a managed bean.
Step 5: The commandButton Method will be like this
public String cb1_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("getHelloMsg ");
Object result = operationBinding.execute();
System.out.println("Result= " + result); // result will be the output of PL function
if (!operationBinding.getErrors().isEmpty()) {
return null;
}
return null;
}
Step 6- Save your Application then run index.jspx.