Facing issue in ipad safari browser - JSF2 app
Hi All,
First let me share the techonlogies used in apps.JSF2(MVC)/Java and my requirement is to make run app in IPAD safari browser.
scenario:
In parent window we will do some manipulation work and click button, After clicking this button through javascript it will open new blank window(window.open('','_blank') is used to avoid poup blocker),focus will be in new blank window and JSF2 Ajax call will be going on in background of parent window.After ajax call is over we will refresh some part/component of the parent window. After refrshing it we will change the URL of new window which already opened to fetch PDF.This scenario works well in MAC Safari/Windows Safari,Chrome,IE,FF but fails in to work in IPAD Safari.
Issue:
After Ajax call Over URL not gets changing in child window. But the url get change when we navigate/select the parent window,the child window url gets change and starts to do its operation(fetch pdf)
Below is the sample code
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html">
<h:head >
<script>
function onEventFunction(data) {
var status = data.status; // Can be "begin", "complete" or "success".
var win = null;
switch (status) {
case "begin": // Before the ajax request is sent.
win = window.open('','_blank');
break;
case "complete": // After the ajax response is arrived.
break;
case "success": // After update of HTML DOM based on ajax response..
win.location.href = "XXX.xhtml"; // Not happeing 😟
break;
}
}
</script>
</h:head>
<body>
<h:form>
<h:commandButton value="Click">
<f:ajax render="message" listener="#{ajaxBean.save}" />
<h:outputText id="message" value="#{ajaxBean.message}" /></h:commandButton>
</h:form>
</body>
</html>
Please help me to solve this issue
Thanks,
Thangaraj S.
iPad 2, iOS 7.0.2