After Updating to PrimeFaces 13 PDF Viewer Displays Same Report Repeatedly #52
-
I have a report generation and viewing sequence which has worked flawlessly in PrimeFaces 6 for years in production. Upon updating to PrimeFaces 13, the last part of the sequence is now broken, and I'm not sure what to change to get it working again. The user clicks a button to generate the report after selecting the criteria. The Jasper Reports code generates the report, and I can verify this by viewing the named and timestamped report files produced on the server. After the report is generated, a new streaming PDF object is created for the report just requested, and an onscreen "poll" object downloads the just-created streaming object into the screen's PDF viewer. The PDF viewer appears, and displays the requested report for the user, then the user clicks a button to close the PDF viewer. What has changed since we've updated to PrimeFaces 13 is if the user requests a succession of different report types and criteria, although each requested report is generated on the back-end, only the first requested report displays each time, whereas in PrimeFaces 6, each requested report is generated and displayed in turn. I'm including a sizeable amount of code here to show how the entire sequence is set up to behave, including a call to the new DefaultStreamedContent.builder() which replaced the parameterized constructor. Looking at this, does anything jump out at you as a possible cause for why the PDF viewer only shows the first generated report repeatedly in PrimeFaces 13? Can anyone recommend a way to get the PDF viewer to display each generated report in turn, as it does in PrimeFaces 6? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 25 replies
-
Can you post your Controller code that does the |
Beta Was this translation helpful? Give feedback.
Yes in the Java side you can do
PrimeFaces.current().ajax().update("yourForm")
or whatever you want to update which should probably be your dialog guts?