Page 1 of 1

export (CSV) with a field contains a call to backing bean

Posted: 29 Mar 2012, 00:39
by tony.herstell
Awesome export capability.

Found an issue when one of the fields calls a routine on the backing bean.

given code in table column:

Code: Select all

<h:outputText value="#{RRRController.contactDetails(table-localvar)}" escape="false"/>
The page renders fine with no problems, but when you try to export the table:

Code: Select all

<p:dataExporter type="csv" target="VVV-table" fileName="GGGData" />
we get javax.el.PropertyNotFoundException :
Property 'contactDetails' not found on type RRRController


method sig on controller:

Code: Select all

public String contactDetails(YY yY) {
PF 3.2
jsf-impl: 2.1.6.

Re: export (CSV) with a field contains a call to backing bea

Posted: 29 Mar 2012, 00:57
by tony.herstell
For workaround I moved the "pretty print" routine down to the entity and made it seem like a "getter".

Code: Select all

<h:outputText value="#{eachXXX.someentity.anotherentity.prettyPrintContactDetails}" escape="false"/>
new method sig in base entity:

Code: Select all

public String getPrettyPrintContactDetails() {