Thursday, October 3, 2019

How To Call AppModuleImpl Class Method In Been Through Binding (Second Method)

Hi Every one in this post we will see how to call custom method from AppModuleImpl class pragmatically


In my previous post i have call AppModuleImpl class method in an other way , if you don't have seen yet please visit the following link

http://adfindepth.blogspot.com/2016/06/how-to-call-appmoduleimpl-class-method.html

For this post
Firstly i create a SQL Query base view object  name as EmpVo that takes two parameter

select * from employees e where e.department_id=:bind_deptID and e.first_name like :bind_fName||'%'

we pass the value dept_id and :fName in been and will execute query in AppModuleImpl class

Now create a jsf page drag and drop  EmpVo on page from Data Control  and also drop a button on page
Then create a been with request scope and a button method
 your page will be look like this


Now go to AppModuleImpl class create following method to bind the variable values with query
This method takes two parameter dept_id and fName , attach these values with query and then execute the Query


 Add this method to client Interface of AppModule ,
click on right side pen icon (Edit application module client Interface)
Select exeEmpQ Method from Available side and move to selected side , then click Ok






Now add this method in bindings
Open your JSF page and click on Bindings

Click on + icon of Bindings
Select methodAction from Insert Item and click OK


Now in Create Action Window
Select AppModuleDataControl
In Operation you will see exeEmpQ Method , just click OK


Now From Bindings select exeEmpQ method
Copy the Id of this method
After copy click on Design

Now in been write the following code




Now Run your JSF page and click on button Execute Query

No comments:

Post a Comment