i read the topic about changing <f:loadbundle to <ressource-bundle> for <p:dataexporter to be working with the header writed with messages.propreties
and i change the faces-config.xml but when i click the exporting button i have this message
Code: Select all
7 sept. 2010 13:37:49 com.sun.faces.lifecycle.InvokeApplicationPhase execute
ATTENTION: Argument Error: Parameter targetClass is null
java.lang.NullPointerException: Argument Error: Parameter targetClass is null
at com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:702)
at org.primefaces.ui.util.ComponentUtils.getStringValueToRender(ComponentUtils.java:90)
at org.primefaces.ui.component.export.ExcelExporter.addColumnValue(ExcelExporter.java:84)
at org.primefaces.ui.component.export.ExcelExporter.addColumnHeaders(ExcelExporter.java:78)
at org.primefaces.ui.component.export.ExcelExporter.export(ExcelExporter.java:48)
at org.primefaces.ui.component.export.DataExporter.processAction(DataExporter.java:74)
at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:743)
at javax.faces.component.UICommand.broadcast(UICommand.java:368)
at org.ajax4jsf.component.AjaxViewRoot.processEvents(AjaxViewRoot.java:321)
at org.ajax4jsf.component.AjaxViewRoot.broadcastEvents(AjaxViewRoot.java:296)
Code: Select all
<h:commandLink id="hlinkExport">
<p:dataExporter type="xls" target="dataTable" fileName="listeStructure" excludeColumns="4"/>
</h:commandLink>
and the datatable is this
Code: Select all
<rich:dataTable style="width : 98% ; align : center"
binding="#{structureBean.dataTable}" id="dataTable">
<f:facet name="header">
<h:outputLabel value="#{i18n.structure_resultat}"></h:outputLabel>
</f:facet>
<rich:column id="colcode" sortBy="#{item.codearbo}">
<f:facet name="header">
<h:outputLabel value="#{i18n.structure_codeArbo}"></h:outputLabel>
</f:facet>
<h:outputText value="#{item.codearbo}" />
</rich:column>
Code: Select all
<application>
<message-bundle>ApplicationMessages</message-bundle>
<view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
<el-resolver>org.springframework.web.jsf.el.SpringBeanFacesELResolver</el-resolver>
<resource-bundle>
<base-name>ApplicationMessages</base-name>
<var>i18n</var>
</resource-bundle>
<locale-config>
<default-locale>fr_FR</default-locale>
<supported-locale>fr_FR</supported-locale>
<supported-locale>en_EN</supported-locale>
</locale-config>
</application>