Hi All,
I'm using Jdev 11.1.2.4.0 and my IE version is 8.
I have implemented the sample based on blog wrote by Frank. When I run the sample application my page loaded but below it is showing warning like
Object doesn't support this property or method
My sample code is
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<f:view xmlns:f="http://java.sun.com/jsf/core" xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<af:document title="scriptTest.jsf" id="d1" clientComponent="true" onunload="performUnloadEvent">
<af:resource type="javascript">
window.addEventListener('beforeunload', function () {
performUnloadEvent()
},
false)
function performUnloadEvent() {
var eventSource = AdfPage.PAGE.findComponentByAbsoluteId('d1');
var x = AdfCustomEvent.queue(eventSource, "handleOnUnload",
{
args : 'noargs'
},
false);
var y = 0;
}
</af:resource>
<af:serverListener type="handleOnUnload" method="#{managedBean.callLogout}"/>
<af:form id="f1">
<af:panelStretchLayout id="psl1">
<f:facet name="center">
<af:panelGroupLayout layout="scroll" id="pgl1">
<af:inputText label="Name" id="it1"/>
<af:inputText label="Address" id="it2"/>
</af:panelGroupLayout>
</f:facet>
</af:panelStretchLayout>
</af:form>
</af:document>
</f:view>
Please suggest Why I'm getting this problem and how to call the java method on browser close.
Regards
Ragupathi