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!

adf javascript clientlistener not capturing the TAB keypress event

727467Jun 7 2010 — edited Jun 8 2010
Hi,

I have client listener attached to a text field to trap the keyPress event. The method is being called for all the key strokes except special keys like TAB, arrow keys, pageup, pagedown etc. Is there any possibility to capture TAB key event.

<af:clientListener method="myFunctionTosetFocus"
type="keyPress"/>

function myFunctionTosetFocus(event) {
alert('function called....')

var keyCodePressed = event.getKeyCode();
if(keyCodePressed == AdfKeyStroke.ENTER_KEY || keyCodePressed == AdfKeyStroke.TAB_KEY) {
alert('Do some thing here....')
}

}


I can see both the alert messages when I click on the ENTER key. But I cannot see both the alert messages when I cick on TAB key. The same is working without any problems in firefox.

Thanks and Regards,

S R Prasad
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2010
Added on Jun 7 2010
3 comments
3,762 views