我有一个 modalPanel 声明为
<rich:modalPanel id="printEmailExcel" minWidth="800" minHeight="600" resizable="true">
<div style="width: 1055px; height: 700px; overflow: auto">
<s:decorate template="/view/popup/printEmailExcelPopup.xhtml"styleClass="popupCDiv">
<ui:param name="panelid" value="printEmailExcel" />value="/view/printForm/order.xhtml" />
</s:decorate>
</div>
</rich:modalPanel>
还有一个命令按钮可以在同一页面中显示 modalPanel
<s:button oncomplete="#{rich:component('printEmailExcel')}.show()" image="/images/icons/btn_print.gif" ></s:button>
在 printEmailExelPopup.xhtml 里面,有一个
<h:form><s:button view="/view/print/order.xthml" /></h:form>
订单.xhtml:
<p:document xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:p="http://jboss.com/products/seam/pdf">
The document goes here.
< /p:document>
问题是当我单击 modalPanel 中的 s:button 时,它只会刷新整个页面并且不会下载 pdf 文件。但是,如果我将 s:button 放在 modalPanel 之外(与 rich:modalPanel 相同级别,它可以正常工作)。有什么帮助吗?