我遇到了PrimeFaces組件p:dataExporter的問題。這裏是我的代碼:Primefaces <p:dataExporter>不生成Excel下載
<p:commandButton value="Export to Excel" ajax="false">
<p:dataExporter type="xls" target=":mainForm:mainTable" fileName="export" />
</p:commandButton>
當我點擊按鈕,它只是刷新XHTML頁面,並沒有產生XLS下載。我已經嘗試過h:commandButton和h:commandLink,但它仍然不起作用。此外,我已經嘗試鏈接POI v3.10和v3.7,但仍然是相同的錯誤。我不知道如何繼續。請幫忙。
「同樣的錯誤」。什麼錯誤? – kolossus
當我點擊按鈕時,它只刷新了XHTML頁面,並沒有產生XLS下載。 – user3410471
你確定你的目標「:mainForm:mainTable」是正確的嗎? – Rodolfo