Close window for firefox in ADF application in jDev11g
Hi,
I hace a ADF application where in my jspx page i have to click on a cancel button to close my browser window.
To close my browser window(using mozilla firefox 3.5+) in my application in jDev11g i am using java script in my jspx page for the close button ,but, it is not closing the window and also not giving any message asking to close my window.
This is the from the source of my jspx page, where i have a close button to close the window.
<?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:trh="http://myfaces.apache.org/trinidad/html"
xmlns:af="http://xmlns.oracle.com/adf/faces/rich">
<jsp:directive.page contentType="text/html;charset=UTF-8"/>
<f:view>
.........(some code)
<af:document id="d1" binding="#{backingBeanScope.backing_Page3.d1}">
<f:facet name="metaContainer">
<trh:script>
function closeWindow()
{
window.close();
}
</trh:script>
</f:facet>
<af:form id="f1" binding="#{backingBeanScope.backing_Page3.f1}">
<f:facet name="center">
<af:group binding="#{backingBeanScope.backing_Page3.g1}" id="g1">
<af:commandButton text="Close"
binding="#{backingBeanScope.backing_Page3.cb2}"
id="cb2">
<af:clientListener method="closeWindow" type="click"/>
</af:commandButton>
..........
Please suggest a way to solve the problem.
Is there any alternate approach to close the window in firefox without using java script or i will have to do it using javascript only. Please suggest.