Export to GitHub

primefaces - issue #4013

Support for CellEditor and Images in Exporter


Posted on May 8, 2012 by Massive Lion

This is an enhancement request. We are currently using PrimeFaces 3.2 data exporter. It works great expect that we have to supply custom overrides for every single export file format which takes CellEditor and HtmlGraphicImage into account in the exportValue() method like follows:

public class ExtendedExcelExporter extends ExcelExporter {

    @Override
    protected String exportValue(FacesContext context, UIComponent component) {
        if (component instanceof CellEditor) {
            return exportValue(context, ((CellEditor) component).getFacet("output"));

} else if (component instanceof HtmlGraphicImage) { return (String) component.getAttributes().get("alt"); } else { return super.exportValue(context, component); } }

}

I think they makes sense enough so that they can be included in PrimeFaces' own Exporter#exportValue() method.

Comment #1

Posted on Feb 22, 2014 by Swift Rhino

(No comment was entered for this change.)

Comment #2

Posted on Jun 7, 2015 by Quick Camel

This is an essential requirement.

Comment #3

Posted on Jun 17, 2015 by Swift Wombat

Is there a way to export graphic image which is stored as a string in datamodel to pdf\excel. I want to export graphic images instead of their alt content in pdf. Could you guys please help me out in this.

Status: Fixed

Labels:
Priority-Medium Type-Enhancement TargetVersion-5.0 TargetVersion-4.0.9 TargetVersion-3.5.25