hello
Although my getter gets different image, mediaOutput is not updated.
can you look at it
<a4j:commandButton value="FotoÄŸraf" action="#
{haritaBean1.fotoAl}" // in fotoAl my setter resides...setFoto_byte(buf)
reRender="fotoPanel,foto" oncomplete="javascript:Richfaces.showModalPanel('harita:fotoPanel');"> </a4j:commandButton>
.
.
. . <rich:modalPanel id="fotoPanel" autosized="true" keepVisualState="false" width="605" height="455">
<a4j:mediaOutput id="foto" element="img" mimeType="image/png" createContent="#{haritaBean1.drawFoto}" style="width:600px ; height:450px ; " border="1px"> </a4j:mediaOutput>
</rich:modalPanel>
/////
related java code
/////
public String drawFoto(OutputStream output, Object object) {
try {
if (getFoto_byte().length > 0) { // getter of photo in byte getFoto_byte()
System.out.println("draw foto ");
System.out.println("------------------------");
output.write(getFoto_byte());
output.flush();
} else {
System.out.println("getFoto_byte().length : "
+ getFoto_byte().length);
}
output.close();
} catch (IOException e) {
// TODO Auto-generated catch block
System.out.println("**ORKUN ***" + "fotoda da sıkıntı var");
e.printStackTrace();
}
return null;
}
can you tell me what the problem may be ?