Riccardo Fassina
Riccardo Fassina

Reputation: 106

PrimeFaces p:graphicImage support for Streamed Content SVG

I'm trying to use a p:graphicImage with an SVG in a streamed content. Right now I'm stuck 'cause if I set the entire path of the file, I'm able to see the image. If I use the StreamedContent (org.primefaces.model.StreamedContent) and I'll watch inside the Console source, I'm not able to see anything.

<p:graphicImage id="imgExpo_#{idPrefix}" value="#{bck.streamedImage}" cache="false" stream="true" > 

public StreamedContent getStreamedImage() {
    FacesContext context = FacesContext.getCurrentInstance();
    if (context.getCurrentPhaseId() == PhaseId.RENDER_RESPONSE) {
        
        return defaultEmpty;
    }
    else {
        image =  new DefaultStreamedContent(BckUtils.getImageManager.getImageStream(context.getExternalContext().getRequestParameterMap() , user));
        return image;
    }
}

Anyone with some suggestions?

Thanks, Riccardo.

Primefaces 7.0

Upvotes: 0

Views: 244

Answers (0)

Related Questions