首先,此问题仅在Edge上,在Chrome和Firefox上一切正常。
我正在使用JSF 1.2和RichFaces 3.3.3.Final(具有针对IE9 +的社区修复)。
我有一个rich:modalPanel
,由a4j:commandButton
打开。模态面板上有一个h:commandButton
,可隐藏模态面板并导出用jasperReports生成的pdf。我的问题是,首次导出文件后,模式面板不再显示。我必须重新加载页面,然后它才能再次工作。当我按a4j:commandButton
打开模式面板时,控制台中没有任何新内容,最后一个日志是“ HTML1300:发生导航”。按下h:commandButton
即可。
打开模式面板(contents.jspx)-将printBean.showModalPanel
设置为true
:
<a4j:commandButton
image="/img/print.gif"
styleClass="clsCursorPointer"
action="#{ printBean.onExportReport}"
ajaxSingle="true"
reRender="printConfirmationPanel" />
模式面板(forms.jspx):
<h:panelGroup id="printConfirmationPanel" >
<rich:modalPanel id="printConfirmationMP"
autosized="true"
showWhenRendered="true"
rendered="#{ printBean.showModalPanel}" >
<h:form>
<h:panelGrid columns="2" style="margin: auto">
<h:commandButton id="confirmButton" <--- Export button
value="#{ msgs['printButton']}"
actionListener="#{ printBean.onExportButton}" >
<f:attribute name="format" value="PDF"/>
(more attributes)
</h:commandButton>
<rich:componentControl
attachTo="confirmButton"
for="printConfirmationMP"
operation="hide"
event="onclick" />
</h:panelGrid>
</h:form>
</rich:modalPanel>
</h:panelGroup>
通过将Edge更新到版本81.0.416.53解决了问题。