Are these generating a pdf file?
No this part isn't trying to generate a PDF. It is just creating a jpeg image (image/jpg MimeType). I have a different piece that does the PDF creation that is working fine even when I use the exact same code works when I put it in another xhtml file and use p:document around it and when it is on the same page that has the call and displays the modalPanel.
When I say exact same code, I'm just referring to the p:barchart and all of its child XML pieces.
It only fails when inside a rich:modalPanel.
Sorry that wasn't very clear.
I have the same code
<p:barchart ... ... </p:barchart>
in the page that has and calls the modalPanel and in another page that generates a PDF.
Therefore it generates a PDF correctly. Plus it generates a JPEG image correctly when not in a modalPanel.
The only place it is failing is when p:barchart code is inside the modalPanel and I am trying to create a JPEG image.
Hopefully that is a little clearer.