I have a table connected to a detail PayLoanView and one of the fields has an LOV as defined as per below snapshot.


]
the LOV field is a table column.


Requirement
I used to filter the LOV programmatically like below.
| | public void filterLoanItemTypes(LaunchPopupEvent launchPopupEvent) { |
| | DCBindingContainer binding = BindingsUtil.getBindingContainer(); |
| | FacesCtrlLOVBinding lov = (FacesCtrlLOVBinding)binding.get("PitmDesc"); |
| | lov.getViewObject().setWhereClause("ITEM_TYPE = 3"); |
| | } |
But I get the NPE exception although I have defined the an attribute variable to for the attribute containing the LOV.
on line lov.getViewObject().setWhereClause("ITEM_TYPE = 3");
lov is null apparently ... then defined an attribute binding for it ....like below.

But then I got the below error:
Caused by: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adfinternal.view.faces.model.binding.FacesCtrlLOVBinding
at pay.view.bean.basicinfo.PersonnelBasicInfoBean.filterLoanItemTypes(PersonnelBasicInfoBean.java:522)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:181)
at com.sun.el.parser.AstValue.invoke(AstValue.java:289)
at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:304)
at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
What is the solution programmatically ...???
Any clue is much apprecite it.
thx
Mike