I try to upgrade from Primefaces version 2.2.1 to version 3.0.1.
The Problem:
I'm using the DynaImage which doen't work anymore. I have a form with:
Code: Select all
<p:graphicImage id="portrait" value="#{portraitPage.foto}" cache="false" width="140px" height="185px" title="#{msgs.profil_portrait}" />
Code: Select all
@Named
@ViewAccessScoped
public class PortraitPage extends AbstractProfilePage {
public StreamedContent getFoto() {
if((fotoStream==null || fotoStream.getStream()==null)){
fotoStream= new DefaultStreamedContent(serviceXY.getByteArrayInpuStream());
if(fotoStream==null || fotoStream.getStream()==null)
fotoStream= new DefaultStreamedContent(getNoPortrait());
} else {
try {
fotoStream.getStream().reset();
} catch (IOException e) {}
}
return fotoStream;
}
}
When I change @ViewAccessScope to @SessionScope the image is displayed.
I remember that a similar problem occured in version 2.2 RC2 which was related to parameters in the URL and was fixed here:
http://code.google.com/p/primefaces/iss ... il?id=1543
Has anybody found a solution for that problem in version 3.0.1 ? Is there a fix or a patch somewhere ?
best reagrds
Thomas