using primefaces data exporter with dynamic sql query
My boss loves the idea of some users of our web-based product being able to make straight SQL queries of the underlying database. I currently have it implemented so that the output of the query goes into a scrollable text area with the columns separated by user specified delimiters. The user can then cut and paste it into their spreadsheet or whatever. This is functional but inelegant and just plain ugly.
Primefaces has its data exporter widget which I'm using in other places and it works great. I'd like to use it for this but it requires predefined getters/setters. Since the query is user-defined, I have no way of knowing in advance the number or types of columns that will be returned.
Any ideas on how to work around this?
Did your try this from primefaces extensions
http://www.primefaces.org/showcase-ext/sections/exporter/dynamicTable.jsf
best vj
链接地址: http://www.djcxy.com/p/68552.html