jsfexporter
jsfexporter copied to clipboard
javax.el.PropertyNotFoundException when using statics helper methods to output values
Hi
jsfexporter looks very interesting but we didn't get very far.
We use statics to do some formatting. So in the datatable:
<p:column headerText="Start Time" exportable="true>
<h:outputText value="#{uiUtils.formatTimeFromLocalDateTime(slot.startDate,currentLocale)}" />
</p:column>
The static itself is along the lines of:
public static String formatTimeFromLocalDateTime(LocalDateTime dt, Locale locale)
{
// do the formatting
}
But jsfexport gave the following stack trace.
16:56:13,794 ERROR [com.myapp.ui.utils.ExceptionManager] (http-localhost/127.0.0.1:8080-3) An unexpected exception has been thrown: javax.el.PropertyNotFoundException: /webapp/myfile.xhtml @71,106 value="#{uiUtils.formatDateFromLocalDateTime(_booking.startDate,currentLocale)}": The class 'com.myapp.ui.utils.UIUtils' does not have the property 'formatDateFromLocalDateTime'.
at com.sun.faces.facelets.el.TagValueExpression.getType(TagValueExpression.java:100) [jsf-impl-2.1.28.redhat-3.jar:2.1.28.redhat-3]
at com.lapis.jsfexporter.impl.value.ValueHolderFormatter.formatValue(ValueHolderFormatter.java:59) [jsf-exporter-core-1.0.3.Final.jar:]
at com.lapis.jsfexporter.impl.value.ValueHolderFormatter.formatValue(ValueHolderFormatter.java:31) [jsf-exporter-core-1.0.3.Final.jar:]
at com.lapis.jsfexporter.util.ExportUtil.transformComponentsToString(ExportUtil.java:41) [jsf-exporter-core-1.0.3.Final.jar:]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportRowCells(DataTableExportSource.java:189) [export-source-primefaces-1.0.3.Final.jar:]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:79) [export-source-primefaces-1.0.3.Final.jar:]
at com.lapis.jsfexporter.primefaces.datatable.DataTableExportSource.exportData(DataTableExportSource.java:45) [export-source-primefaces-1.0.3.Final.jar:]
at com.lapis.jsfexporter.DataExporter.internalProcessAction(DataExporter.java:147) [jsf-exporter-core-1.0.3.Final.jar:]
at com.lapis.jsfexporter.DataExporter.processAction(DataExporter.java:101) [jsf-exporter-core-1.0.3.Final.jar:]