Improvement (dataExporter): Allow EL in exportFuntion

UI Components for JSF
Post Reply
Hamsterbau
Posts: 409
Joined: 28 Dec 2011, 17:44

06 Nov 2017, 19:49

Hi,

it would be nice to be able to use Expression Language (EL) in exportFunction of a p:column element like in sortBy, filterBy or rendered.
Currently the usage with a method with a fixed signature leads to many problems:
  • The default converters cannot be used
  • I have to write an extra method for every column using exportFunction (not DRY principle compatible)
  • Resource bundles cannot be used
  • The UIColumn parameter does not give access to the current row variable
  • faces taglibs cannot be used
So i would like to have the ability to use EL in exportFunction, which would make this attribute much more usable.

PS: One similar request, but for another attribute instead alter the current attribute can be found here: https://github.com/primefaces/primefaces/issues/2238.

Have a nice evening,

Daniel
Primefaces 8.0.7 (PF Extensions 8.0)
JSF: Mojarra 2.3.2 (Spec 2.3) - running on WildFly 22

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

06 Nov 2017, 20:56

+1 - just not much time for every feature on the issue list ;)
so please discuss a possible implementation, create a PR, .., ... or sponsor it ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Hamsterbau
Posts: 409
Joined: 28 Dec 2011, 17:44

07 Nov 2017, 11:40

What means PR? Is it a pull request in the issue tracker?
Than i could do that, perhaps with example code.

Wbr,

Daniel
Primefaces 8.0.7 (PF Extensions 8.0)
JSF: Mojarra 2.3.2 (Spec 2.3) - running on WildFly 22

Melloware
Posts: 3717
Joined: 22 Apr 2013, 15:48

07 Nov 2017, 13:54

This ticket is already open: https://github.com/primefaces/primefaces/issues/2238

And see my pretty cool generic workaround at the bottom.
PrimeFaces Developer | PrimeFaces Extensions Developer
GitHub Profile: https://github.com/melloware
PrimeFaces Elite 13.0.0 / PF Extensions 13.0.0
PrimeReact 9.6.1

Hamsterbau
Posts: 409
Joined: 28 Dec 2011, 17:44

08 Nov 2017, 13:03

Thanks for the hint, but i think i try to override Exporter and use my custom one, because i also need not export numbers as number cells in excel. And than i can also integrate EL evaluation for exportFunction value :roll:
Primefaces 8.0.7 (PF Extensions 8.0)
JSF: Mojarra 2.3.2 (Spec 2.3) - running on WildFly 22

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 28 guests