This content has been marked as final.
Show 5 replies
-
1. Re: a4j:mediaOutput not called
nbelaevski Sep 20, 2008 8:54 AM (in response to damatrix)Edem,
Please post full page code and bean. -
2. Re: a4j:mediaOutput not called
nbelaevski Sep 20, 2008 8:54 AM (in response to damatrix)Bean and page code I really meant to say
-
3. Re: a4j:mediaOutput not called
damatrix Sep 22, 2008 4:34 AM (in response to damatrix)Here is the facelet.
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:rich="http://richfaces.org/rich" xmlns:a4j="http://richfaces.org/a4j" xmlns:sf="http://www.springframework.org/tags/faces"> <div style="float:left"> <rich:panel styleClass="sample" style="float:left"> <a4j:mediaOutput id="picture" element="img" createContent="#{pictureOutput.drawImage}" value="#{subject.photo} mimeType="image/jpeg" > </a4j:mediaOutput> </rich:panel> </ui:composition>
And here's the createContent method in my PictureOutput classpublic void drawImage(OutputStream out,Object data)throws IOException{ if(data instanceof byte[]){ byte[] photo = (byte[])data; if (photo.length>0) { out.write(photo); } } }
The value to the mediaOutput control ie. "subject.photo" is a byte[]. -
4. Re: a4j:mediaOutput not called
abelevich Sep 22, 2008 11:19 AM (in response to damatrix)Hello damatrix,
I can't reproduce your bug. -
5. Re: a4j:mediaOutput not called
damatrix Sep 25, 2008 9:57 AM (in response to damatrix)Hi,
I still haven't been able to resolve my issue. You said you couldn't reproduce the bug. Did you test with a Spring Web Flow 2 application? If so can you bundle up yours for me to see what I'm doing wrong?
I don't know if my "subject" object is not being found in the scopes of Spring Web Flow so it can render the byte[] field. I really need some help here.