0

MBean で使用されるコード:-

private StreamedContent           file;
        public void actionGenerate () {

  String reportType= XML/PDF/XLS;
  byte[] reportOut;

  file = new DefaultStreamedContent(new ByteArrayInputStream(reportOut), ReportMimeType.valueOf(reportType)
                    .getLabel(), "abcListReport." + reportType.toLowerCase());
}

XHTML のコード:-

        <div id="p_searchButtons">
            <p:commandButton ajax="false" id="btnGenerateReport"
                target="_blank" value="#{text.common_Submit}"
                actionListener="#{abcListPrintMB.actionGenerate}"
                widgetVar="generateReport">
                <p:fileDownload value="#{abcListPrintMB.file}" />
            </p:commandButton>
        </div>

primefaces 3.3 が使用されています。

ローカル環境 (ローカル ドメイン) で PDF をダウンロードできる IE8

4

2 に答える 2

0

p:fileDownload は、ダウンロードが https 経由で要求された場合、IE8 では機能しません。IE 設定の [暗号化されたページをディスクに保存しない] が有効になっている場合にのみ機能します。

以下のリンクを確認してください: https://code.google.com/p/primefaces/issues/detail?id=5934

于 2014-07-29T13:06:45.370 に答える
-1

IE 8 のセキュリティの問題 ブラウザの詳細設定を確認する必要があります

于 2012-12-27T11:18:22.320 に答える