Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Value change listener error-- Unable to set operation Binding Parameters

Prince-PranayFeb 22 2017 — edited Feb 23 2017

Hi Experts,

I'm new to adf , While developing one sample page which consists on "Select One Choice List" , based on its value i want to display records in below table set.

i followed below steps.

1. i defined view criteria and bind variable of View object which needs to be displayed in below table set.

2. Written below method in AMIMPL and drag it to client interface

public void applydyncriteria(int Bid)

{

        ViewObjectImpl voins=this.getXxEmployeeInfoView1();

        ViewCriteria criteria = voins.getViewCriteria("XxEmployeeInfoViewCriteria");

        voins.setNamedWhereClauseParam("BUID", Bid);

        voins.applyViewCriteria(criteria);

        voins.executeQuery();

    }

3.on select one choice , i enabled value change listener and written below code in manage bean and it seems i'm getting null pointer exception at below line

public void checkval(ValueChangeEvent valueChangeEvent) {

    // Add event code here...

    this.setValueToEL("#{bindings.BusinessUnitId.inputValue}", valueChangeEvent.getNewValue()); //Updates the

    System.out.println("valueoflist"+ valueChangeEvent.getNewValue());

   String i = (String)resolveExpression("#{bindings.BusinessUnitId.attributeValue}");

  int j= Integer.parseInt(i);

    System.out.println("valueoflist"+i+"-"+j);

    oracle.binding.BindingContainer bindings = getBindings();

    OperationBinding operationBinding = bindings.getOperationBinding("applydyncriteria");

    Map m =operationBinding.getParamsMap();  **// Here am getting Null pointer exception**

     m.put("Bid", j);

    operationBinding.execute();

    }

So while selecting any value am getting below error

adfbug.JPG

My server log

Caused by: java.lang.NullPointerException

at Demo.adf.bean.MyListbean.checkval(MyListbean.java:87)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.sun.el.parser.AstValue.invoke(Unknown Source)

at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)

at org.apache.myfaces.trinidadinternal.taglib.util.MethodExpressionMethodBinding.invoke(MethodExpressionMethodBinding.java:53)

... 42 more

<XmlErrorHandler> <handleError> ADF_FACES-60096:Server Exception during PPR, #1

javax.servlet.ServletException

It states problem is in MylistBean(Managebean name) at line 87

which is Map m =operationBinding.getParamsMap();

This is something weird issue. i dont where the issue occurring. can someone please help me out?

My jdev version is 11.1.1.7

Thanks

This post has been answered by Kashif Ali on Feb 22 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 23 2017
Added on Feb 22 2017
6 comments
362 views