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!

Press 'Enter Key' on an inputText field to fire value change event (or call valueChangeListener)

MuddasarJan 8 2017 — edited Jan 9 2017

Hi Good Day,

I am using 12.1.3.0.0

In my page fragment, I have an af:table containing an input text item in a column. When user enters some value in the field and hit the 'Enter Key' the value in the field should be submitted and valueChangeListener should be called.

I have tried following java script code:

<af:resource type="javascript">

      function submitValue(event) {

          if (event.getKeyCode() == AdfKeyStroke.ENTER_KEY) {

              document.getElementById("r1:0:r1:0:pc1:t2:1:it4::content").blur();

          }

      }

    </af:resource>

I am calling this function by a client listener on that field. But problem in this code I am facing is, the client listener detects all the other keys except 'Enter Key', I don't know why is it so.

Please help!

Thanks

Mudi

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 6 2017
Added on Jan 8 2017
8 comments
2,341 views