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!

How to prevent popup from getting close by escape key?

Neliel-Oracle-Newbie-OracleMar 8 2012 — edited Mar 8 2012
Dear All,

My code relies heavily on popup and navigation is done thru button clicks on popup.

However I notice that clicking escape key at the browser, removes my popup.
Is there a way to prevent these?

<af:resource type="javascript">
  function handleDialog(event)
  {
	if(event.getOutcome ==  AdfDialogEvent.OUTCOME_CANCEL)
	{
	  event.cancel();
	}
  }
</af:resource>

<af:popup id="pop">
  <af:dialog id="pt_d1" type="yesNo">
	<af:panelGroupLayout id="pt_pgl1">
		<!-- more code here -->
	</af:panelGroupLayout>
	<af:clientListener method="handleDialog" type="dialog"/>
  </af:dialog>
</af:popup>
Tried it with the code above but it seems my popups can still be negelected by pressing Escape Key.

Any hints?

JDEV 11G PS4

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2012
Added on Mar 8 2012
1 comment
1,961 views