I created a method (that has a typed list parameter for ex: List<ObjectType>) in Application Module class and exposed to view layer through client interface. Add exposed method from AM class using method Action binding in page definition file. And when I tried to execute this operation binding during run time, some times I got below error message in log files and some times not, but method did not get executed in either cases.
Created AM Method:
--------------------------
public String insertEmpDetails(ArrayList<empObj> empDetailsList) {
//business logic
}
Operation Binding in Page definition file:
---------------------------------------------------
<methodAction id="insertEmpDetails"
InstanceName="HRDBAppModuleDataControl.dataProvider"
DataControl="HRDBAppModuleDataControl"
RequiresUpdateModel="true" Action="invokeMethod"
MethodName="insertEmpDetails" IsViewObjectMethod="false"
ReturnName="data.HRDBAppModuleDataControl.methodResults.insertEmpDetails_HRDBAppModuleDataControl_dataProvider_insertEmpDetails_result">
<NamedData NDName="empDetailsList"
NDType="java.util.ArrayList<com.oracle.types.empObj>"/>
</methodAction>
Warning in Log file:
------------------------
[2014-05-20T19:03:57.827+05:30] [AdminServer] [WARNING] [] [oracle.adf.controller.faces.lifecycle.Utils] [tid: [ACTIVE].ExecuteThread: '11' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: e9d0884f97c30d1a:-5af6bfa2:1461863bfa1:-8000-0000000000000562,0] [APP: DecomApp] [DSID: 0000KOPpMe_33FLaEPf9ES1JUjfG00000I] ADF: Adding the following JSF error message: Method HRDBAppModuleDataControl.dataProvider.insertEmpDetails() not supported[[
oracle.jbo.InvalidOperException: JBO-25221: Method HRDBAppModuleDataControl.dataProvider.insertEmpDetails() not supported
at oracle.adf.model.binding.DCInvokeMethod.invokeMethod(DCInvokeMethod.java:581)
at oracle.adf.model.binding.DCDataControl.invokeMethod(DCDataControl.java:2143)
at oracle.adf.model.bc4j.DCJboDataControl.invokeMethod(DCJboDataControl.java:3118)
at oracle.adf.model.binding.DCInvokeMethod.callMethod(DCInvokeMethod.java:261)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.doIt(JUCtrlActionBinding.java:1635)
at oracle.adf.model.binding.DCDataControl.invokeOperation(DCDataControl.java:2150)
at oracle.jbo.uicli.binding.JUCtrlActionBinding.invoke(JUCtrlActionBinding.java:740)
at oracle.adf.controller.v2.lifecycle.PageLifecycleImpl.executeEvent(PageLifecycleImpl.java:407)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding._execute(FacesCtrlActionBinding.java:252)
at oracle.adfinternal.view.faces.model.binding.FacesCtrlActionBinding.execute(FacesCtrlActionBinding.java:210)
at com.oracle.empBean.submitReq(empBean.java:889)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
After multiple trails, I found problem in page definition and changed NDType as shown below. This time, it worked properly.
Updated Page Definition file:
------------------------------------
<methodAction id="insertEmpDetails"
InstanceName="HRDBAppModuleDataControl.dataProvider"
DataControl="HRDBAppModuleDataControl"
RequiresUpdateModel="true" Action="invokeMethod"
MethodName="insertEmpDetails" IsViewObjectMethod="false"
ReturnName="data.HRDBAppModuleDataControl.methodResults.insertEmpDetails_HRDBAppModuleDataControl_dataProvider_insertEmpDetails_result">
<NamedData NDName="empDetailsList"
NDType="java.util.ArrayList"/>
</methodAction>
Not sure, what's causing the problem. I found this workaround to solve my problem.
No comments:
Post a Comment
Provide your thoughts !