I try to use a dynamic p:graphicImage with a StreamedContent object but nothing is displayed. The img tag is rendered in the html markup but with firebug I can see that the img src attribute is causing a 404 - not found error. I'm using a similar approach as described here. In a custom java class I'm generating a StreamedContent object from a previously uploaded image. In an ivy script block I'm assigning the return value to a dataclass attribut of type StreamedContent. Here some code snippets:
The following URL is generated for the img src attribute: http://localhost:8081/ivy/faces/javax.faces.resource/dynamiccontent.properties?ln=primefaces&pfdrid=pfdrid_945697ac-ead2-49e3-af3c-4185184fe927 which isn't accessible. After a bit of research and debugging it seems to be an ivy designer bug :). As described over at stackoverflow you should use a method expression for the value attribute of the p:graphicImage. This method should be called twice:
In ivy this method is only called once. I've tested it with v5.0.16 and v5.1.4 to no avail. As the mentioned solution from stackoverflow is working in a standalone jsf web application I assume that this is an ivy designer bug. I'm looking forward to any feedback to solve this issue. |
Once you sign in you will be able to subscribe for any updates here
By RSS:Markdown Basics
Tags:
Asked: 06.05.2015 at 14:40
Seen: 14,444 times
Last updated: 17.06.2015 at 08:46