Since 3.0
When using the data exporter utility, if one wishes to prevent certain data to be exported in the file, one can add the <ace:excludeFromExport /> tag inside the component one wants to avoid exporting. If this tag is placed inside <ace:column>, <ace:row>, or <ace:columnGroup> it will prevent the entire column, row or column group from being exported. This component is only read by the data exporter. It doesn't affect any other aspect of the page.
See the ICEfaces Showcase Live Demo of this component, complete with source code.
The following is an example of <ace:excludeFromExport />.
<ace:dataExporter type="csv" target="myTable" fileName="tableData"/>
<ace:dataTable id="myTable" value="#{bean.items}" var="item">
<ace:column headerText="Column One">
<ace:excludeFromExport />
<h:outputText value="#{item.propertyA}"/>
</ace:column>
<ace:column headerText="Column Two">
<h:outputText value="#{item.propertyB}"/>
<h:outputText value="#{item.propertyC}">
<ace:excludeFromExport />
</h:outputText>
</ace:column>
</ace:dataTable>
The code above will prevent the entire first column from being exported, and for the second column, only property B will be exported.
If a table is using stacked columns, it won't affect the results of the exporting action. The data exporter is unaware of stacked columns.
This component has no attributes.
This component doesn't affect any aspect of the client side.
Not applicable.
None, at the moment.