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!

AdfCustomEvent.queue() NOT getting fired with IE 9

872257Jan 26 2012 — edited Jan 30 2012
Hi ALL,

I am trying to use a simple server listener for browser close event.

The code is executing as expected in FireFox but it is not getting invoked in IE 9.

With IE 9 the JavaScript is getting invoked as the alert in the javascript is getting executed, but the server invocation is not happening.

IS there any know issue with the same OR AM I going wrong some where...

Following is the code snippet.

<?xml version='1.0' encoding='UTF-8'?>
<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>

<f:view>

<af:document id="d1" onunload="performUnloadEvent"
clientComponent="true">
<af:resource type="javascript">
window.onbeforeunload = performUnloadEvent;
function performUnloadEvent(){
var eventSource = AdfPage.PAGE.findComponentByAbsoluteId('d1');
AdfCustomEvent.queue(eventSource,
"handleOnUnload",
{}, true);
alert("Browser Terminated " + eventSource);

}
</af:resource>

<af:serverListener type="handleOnUnload"
method="#{homeBean.onUnloadHandler}"/>
<af:form id="f1">

<af:region value="#{bindings.alarmstaskflowdefinition1.regionModel}"
id="r1"/>
</af:form>
</af:document>
</f:view>
</jsp:root>

Regards,
Nagesh
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2012
Added on Jan 26 2012
2 comments
355 views