java - Need to prevent popup getting closed on press of esc key -
i have popup inside have selectonechoice drop down. while clicking on drop down , pressing escape key entire popup getting closed in adf. requirement prevent closing popup on press of esc key if selectonechoice selected.
i have been trying close normal popup using below code not working
window.onkeydown = function(event){ if(event.keycode == 27){ event.cancel(); } } i have tried out options overwrite clientlisteners popupclosed , popupcanceled didn't either.
any on how interpret esc key functionality , prevent adf popup getting closed.
each adf faces component class has javascript equivalent. popup richpopup class reflected adfrichpopup in javascript.
you can achieve supressing cancel's method in javascript object adfrichpopup:
<af:resource type="javascript"> function onpopupopened(event) { var popup = event.getsource(); popup.cancel = function() {}; } </af:resource> <af:popup> <af:clientlistener method="onpopupopened" type="popupopened"/> </af:popup> of course, means won't able use cancel() method yourself, can use hide() method instead.
Comments
Post a Comment