I have a buffered image and I need to display it in a JSF page. Is there any UI component available which can display a buffered image directly? I am using JSF 2.2.
相关问题
- java.lang.NullPointerException at java.io.PrintWri
- h:selectOneMenu in p:dataTable doesn't submit
- PrimeFaces block UI does not work when the compone
- primefaces orderlist not getting updated with the
- JSF2 composite cc.attrs expression does not evalua
相关文章
- How to allow numbers only using f:validateRegex
- JSF 2.0: ajax request when press ENTER
- Formatting a double in JSF
- f:convertNumber on Double: ClassCastException
- SeamPhaseListener - Could not start transaction -
- How do I access EJB bean when inside a custom Conv
- Getting value from dynamically created inputText
- JSF 2.0 javascript onload/oncomplete
If you only have the buffered image, you could use the Omnifaces library to which allows you to render images by passing a
byte[]
to the componentIf you have the buffered image you could convert to byte array like so:
You could also create a servlet to receive the image id as a get request and from that point on you can get the parameter value, find the resource and write the image content to response.
@BalusC has a nice example here