I’m using Primefaces 3.4 and trying to export a data-table with in-cell editing. It doesn’t seem to work.
I have done the following:
Modified org.primefaces.component.export.Exporter line 143 and added this:
else if (component instanceof CellEditor) { // Handle in-cell editable datatables
return exportValue(context, ((CellEditor) component).getFacet("output"));
}
This is causing an extra row on top as well as an extra column to the right of the actual cells with data. With Excel files it’s OK since they are not “visible” but PDF looks bad.
- Is there a way to make PF 3.4 support this without changing the source code?
- If the answer to the above is negative, can I make the PDF get generated without the additional row/column?
No. You’ve to provide your custom
Exporterimplementations/overrides. I’ve already reported this as issue 4013 several months ago. It not only mentionsCellEditor, but alsoHtmlGraphicImage(we are using images to show boolean states, whosealtwe’d like to show in PDF/XML/XLS/CSV reports).All you can do is to vote for it so that it’ll hopefully get more attention, or by re-asking it on PF forum.
You can hide a column from export by setting the
exportable="false"attribute.