掲示板
Example jsf2-export-pdf-portlet - Try to download a UIData Error
12年前 に Gesuino Napoli によって更新されました。
Example jsf2-export-pdf-portlet - Try to download a UIData Error
New Member 投稿: 3 参加年月日: 11/12/05 最新の投稿
Hi all, i'm be able to configure and run the example jsf2-export-pdf-portlet. But if I want to extend it and try to download an Excel created from an UIData (dataTable) i have many problems.
This is my scenario: i have a jsf page with a dataTable and a button download Excel. When the user clicks download an ExcelService starts, takes from view the dataTable, create the excel and return it to the Client view.
The problem is "takes from view". In the example there is an extension CustomerResourceHandler that manage the Resource but in my case when my Resource (ExcelResource) try to obtain the dataTable a NullPointerException is Throws.
I tried to make UIData a Managed sessionScoped Bean but the same problem is throws when my method try to read some properties from the dataTable. Any Idea how to solve my issue? Tnx Gesuino
This is my scenario: i have a jsf page with a dataTable and a button download Excel. When the user clicks download an ExcelService starts, takes from view the dataTable, create the excel and return it to the Client view.
The problem is "takes from view". In the example there is an extension CustomerResourceHandler that manage the Resource but in my case when my Resource (ExcelResource) try to obtain the dataTable a NullPointerException is Throws.
I tried to make UIData a Managed sessionScoped Bean but the same problem is throws when my method try to read some properties from the dataTable. Any Idea how to solve my issue? Tnx Gesuino
11年前 に Neil Griffin によって更新されました。
RE: Example jsf2-export-pdf-portlet - Try to download a UIData Error
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
11年前 に Gesuino Napoli によって更新されました。
RE: Example jsf2-export-pdf-portlet - Try to download a UIData Error
New Member 投稿: 3 参加年月日: 11/12/05 最新の投稿
Thank you Neil but this is not the solution. Primefaces and Icefaces to export the data they use the HttpServetResponse. Like example primefaces export excel in this way
This cause two problems, with liferay we cannot use HttpServletResponse directy and this produce an error, second the response is encapsuled by liferay that return an html and not an excel.
writeExcelToResponse(((HttpServletResponse)context.getExternalContext().getResponse()), wb, filename);
This cause two problems, with liferay we cannot use HttpServletResponse directy and this produce an error, second the response is encapsuled by liferay that return an html and not an excel.
11年前 に Neil Griffin によって更新されました。
RE: Example jsf2-export-pdf-portlet - Try to download a UIData Error
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
A few weeks ago I submitted a patch for this problem to Çağatay. See PrimeFaces Issue#1109.
He indicated that it would be fixed in PrimeFaces 3.4. Until then, you can apply that patch to a local build of PrimeFaces 3.3.1 in order to get things working.
He indicated that it would be fixed in PrimeFaces 3.4. Until then, you can apply that patch to a local build of PrimeFaces 3.3.1 in order to get things working.
11年前 に Gesuino Napoli によって更新されました。
RE: Example jsf2-export-pdf-portlet - Try to download a UIData Error
New Member 投稿: 3 参加年月日: 11/12/05 最新の投稿
This is a great improvment, thank you Neil for your important work!
11年前 に Neil Griffin によって更新されました。
RE: Example jsf2-export-pdf-portlet - Try to download a UIData Error
Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
My pleasure Gesuino -- Thanks for using Liferay Faces.