RF + iframe + IE8 + jasper : showWhenRendered issue
kineas Dec 22, 2011 10:36 AMHi everyone,
I got some strange issue and I really don't know what the matter is precisely, so I need your help.
First of all I use these versions :
- RichFaces 3.3.3.Final
- jasperReport 3.7.5
- itext 2.1.7
- Internet Explorer 8
I have a panel in my application for automaticaly display error or information messages with MessagesManager :
<a4j:outputPanel ajaxRendered="true"> <rich:modalPanel onshow="document.getElementById('messagePanelId:closeButtonId').focus();" id="messagePanel" showWhenRendered="#{facesContext.maximumSeverity != null}"> ... </rich:modalPanel> </a4j:outputPanel>
And I have a JSP with only 2 buttons, one for add an error in the MessagesManager (this way I can test the display of my "messagePanel") and one for generate and open a PDF (using JasperReport) :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" > <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %> <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %> <%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%> <html> <head> <link rel="stylesheet" type="text/css" href="${request.contextPath}/styles/core.css" /> <script language="javascript" src="<%=request.getContextPath()%>/scripts/core.js"></script> </head> <body> <f:view> <h:form id="mainFormId" style="text-align: center"> <%-- print button --%> <a4j:outputPanel> <h:commandButton action="#{testControllerBean.printListPiecesPDF}" type="button" value="Imprimer"/> </a4j:outputPanel> <%-- error button --%> <a4j:commandButton action="#{testControllerBean.displayError}" type="button" value="Display error"/> </h:form> <%@include file="/pages/message.jsp"%> </f:view> </body> </html>
So, like this, it is working as intended.
Now, for some reason, I have to use an iframe in my application like this :
<iframe style="position:absolute;width: 100%; height: 100%; overflow-y: hidden; z-index: 1" frameBorder="0" src="http://localhost:8080/mvn_test/pages/main.jsf"/>
And here comes the bug : when I click on the error button, no problem, the message is display but if I click on the PDF button (generate and open PDF) then the message can't be display (when I click on the errorbutton). I can see with the debugger that the action of my controller is called but the message doesn't appear on the screen.
So my question is : why without the iframe everything is working as expected but not with ? Why generate a PDF makes the "showWhenRendered" option doesn't work anymore ?
Note : - the issue is present only on Internet Explorer, there are no issues with Firefox or Chrome.
- I am not English, so forgive me for my mistakes and I hope you still understand me.