0
<h:head></h:head>     

    <h:form >

        <h3>Dynamic Data table example</h3>
    <p:dataTable id="tbl" var="dizgi" value="#{viewEmployeesManagedBean.dizgi}">
    <f:facet name="{Exporters}">

                <h:commandLink>
                <p:graphicImage library="images" name="excel.png" width="24" />
                <p:dataExporter type="xls" target="tbl" fileName="dizgi" />
            </h:commandLink>

        </f:facet>
    <p:column headerText="AgentCode">
        <h:outputText value="#{dizgi.agentCode}" />
    </p:column>

    <p:column headerText="Date">
        <h:outputText value="#{dizgi.date}" />
    </p:column>

    <p:column headerText="ticket_sold">
        <h:outputText value="#{dizgi.ticket_sold}" />
    </p:column>

    <p:column headerText="net_usd_sale">
        <h:outputText value="#{dizgi.net_usd_sale}" />
    </p:column>

    <p:column style="text-align: center">
   <f:facet name="header">
     <h:outputText value="Details" />
   </f:facet>
   <h:graphicImage value="../resources/images/details.png" />
    </p:column>

</p:dataTable>
<h3>Export Page Data Only</h3>
    <h:commandLink>
        <p:graphicImage library="images" name="excel.png" width="24" />
        <p:dataExporter type="xls" target="tbl" fileName="dizgi" pageOnly="true"/>
    </h:commandLink>

    </h:form>

</html>

Here is the code.I create datatable which has text and images.It displays them

on localhost.It works good but there is one problem.When I export

datatable,In excel image columns are empty.What is the problem guys? Any

suggestion?

user2231498
  • 37
  • 1
  • 7

0 Answers0