Using JSF for <a href="myPicture.png" .../>

I have the following code:

 <div id="links" class="links">
     <ui:repeat var="storageAttachment"
        value="#{gallerySlideshowController.selectedStorageAttachmentList}"
        varStatus="status">

                 <a
                    href=""
                    title="Banana"> <p:graphicImage
                       title="#{storageAttachment.name}" cache="true"
                       value="#{galleryPictureThumbnailRequestController.pictureThumbnail}"
                       rendered="#{galleryPictureThumbnailRequestController.pictureThumbnail != null}">
                       <f:param name="id" value="#{storageAttachment.uniqueId}" />
                    </p:graphicImage>
                 </a>
     </ui:repeat>

How can I replace the link in <a href="" to my picture path? I have stored the path on my local PC for every storageAttachment item. For example: Object1: storageAttachment.path = C:/mypicture.png

So I need something like: href="" -> But this is also not correct because I got

How can I do this? Thank you for every help.


ANSWERS:


Your PictureThumnailRequestcontroller.pictureThumbnail is StreamedContend, there are no href methods or getHref or anything like that but, you can get the image's InpuStream via pictureThumbnail.getStream(). I suppose what your trying to achieve is to render the image but bigger?

  1. So maybe try a simple Servlet to render the image
  2. Use Omnifaces to render with better ease.


 MORE:


 ? Prevent o:graphicImage from throwing an exception, when parameters being passed to a target getter method get mismatched in number, order and type
 ? Display dynamic image from database with p:graphicImage and StreamedContent
 ? Display dynamic image from database with p:graphicImage and StreamedContent
 ? Display dynamic image from database with p:graphicImage and StreamedContent
 ? Display database blob images in <p:graphicImage> inside <ui:repeat>
 ? Open file browse panel of p:fileUpload on click of an image
 ? JSF composite component childrens
 ? JSF Composite component and selectItems
 ? JSF Recursive Composite Component
 ? JSF, Composite Component: method call with default attribute value as parameter