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!

Client attribute returning null value in adf

Lovin_JV_941794Oct 25 2013 — edited Oct 25 2013

hi i am using jdev version = 11.1.1.5.0

I have 2inputs and 2buttons in my adf form.One of my input boxes calls a javascript function using client listener,I need ids of remaining 1input and 2buttons and I am using client attribute.

All the controls have their respective client attribute which gets their id from managebean like following:

<af:clientAttribute name="inpAttr1"  value="#{manageBean.inp1Binding.id}"/>

<af:clientAttribute name="inpAttr2"  value="#{manageBean.inp2Binding.id}"/>

<af:clientAttribute name="btnAttr1"  value="#{manageBean.btn1Binding.id}"/>

<af:clientAttribute name="btnAttr2"  value="#{manageBean.btn2Binding.id}"/>

This javascript function is called on key press event in input box 1.:

function clientEnterKeyPressEvent(evt) {

      try {

          var evtSource = evt.getSource();

          var _inp1 = evt.getSource().getProperty('inpAttr1');

          var _inp2 = evt.getSource().getProperty('inpAttr2');

          var _btn1 = evt.getSource().getProperty('btnAttr1');

          var _btn2 = evt.getSource().getProperty('btnAttr2');

          evt.cancel();

        }

      }

      catch (e) {

        alert("Error caught:" + e.message)

      }

    }

But here i get _inp2,_btn1,_btn2 values null.

Using client attribute i am getting the id of only one control, on which the event is invoked at the time of event.

WHat could be the issue?

Thanks

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2013
Added on Oct 25 2013
5 comments
654 views