我正在使用primefaces 3.2。我需要使用 p:dataExporter。但是参数p:column exportable="false"
和p:column exportOnly="true"
根本不起作用!这可能是什么原因?
这是代码:
<p:dataExporter type="xls" target="dataTable" fileName="clients" postProcessor="#{clientBean.postProcessXLS}" />
<p:dataTable value="#{clientBean.model}" var="item" id="dataTable"
emptyMessage="#{messages['message.empty']}" styleClass="list"
paginator="true" rows="10" widgetVar="table"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
currentPageReportTemplate="(#{messages['table.page.current']}: {currentPage} #{messages['table.totalpages']} {totalPages})"
rowsPerPageTemplate="5,10,15,25,50" paginatorPosition="bottom" paginatorAlwaysVisible="false">
<p:column exportOnly="true">
<f:facet name="header">
<h:outputText value="#{clients['clientNumber']}" />
</f:facet>
<h:outputText value="#{item.clientNumber}" />
</p:column>
<p:column sortBy="#{item.clientNumber}"
exportable="false" filterStyle="display:none;">
<f:facet name="header">
<h:outputText value="#{clients['clientNumber']}" />
</f:facet>
<h:outputLink value="#{request.contextPath}/admin/management/clients/clientInfo.jsf">
<f:param name="id" value="#{item.id}" />
<h:outputText value="#{item.clientNumber}" />
</h:outputLink>
</p:column>