[seam-issues] [JBoss JIRA] Issue Comment Edited: (JBSEAM-4672) s:graphicImage in rich:extendedDataTable - using byte array datasource results in wrong drawing

Edward bai (JIRA) jira-events at lists.jboss.org
Wed Aug 11 09:15:49 EDT 2010


    [ https://jira.jboss.org/browse/JBSEAM-4672?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12544262#action_12544262 ] 

Edward bai edited comment on JBSEAM-4672 at 8/11/10 9:15 AM:
-------------------------------------------------------------

Now I use this function to resolve this question.

<s:graphicImage rendered="#{breedHome.checkPicture()}" value="#{...}">	
 
public boolean checkPicture(){
if( instance.getPicture()!=null){
return instance.getPicture().length>0;
}else{
return false;
}		
}

      was (Author: edward_bai):
    Now I use this function to resolve this question.

<s:graphicImage rendered="#{breedHome.checkPicture()}" value="#{...}">	

      public boolean checkPicture(){
		if( instance.getPicture()!=null){
			return instance.getPicture().length>0;
		}else{
			return false;
		}		
	}
  
> s:graphicImage in rich:extendedDataTable - using byte array datasource results in wrong drawing
> -----------------------------------------------------------------------------------------------
>
>                 Key: JBSEAM-4672
>                 URL: https://jira.jboss.org/browse/JBSEAM-4672
>             Project: Seam
>          Issue Type: Bug
>          Components: JSF Controls
>    Affects Versions: 2.2.0.GA
>         Environment: JDK 1.6.0 Update 18, Windows XP SP3, JBoss 4.2.2.GA, Oracle 10g express, 
>            Reporter: Helge Mahrt
>
> I am using the s:graphicImage in a rich:column within a rich:extendedDataTable:
> <rich:extendedDataTable id="languageDataTable" value="#{dtoList}" var="item" >
> <rich:column sortable="false">
> <s:graphicImage value="#{item.imageData}"/>
> [...]
> </rich:column>
> </rich:extendedDataTable>
> imageData is a byte array which is bound to a BLOB in the database. Not all objects in the database have an image, in fact most have null in the image field.
> After encountering the first row, where the object behind does have an image, s:graphicImage keeps drawing this very image in every subsequent row, until it encounters another object with the image set. Per default imageData returned a byte array of 0 size when there is no image in the database. I tried replacing that value by null, but the behaviour did not change.
> There are no errors or execeptions showing up. I think s:imageData, when using byte arrays as source, is not properly reacting to invalid/null image data.
> As a work-around I used the rendered attribute to hide the s:graphicImage control when there is no image data.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the seam-issues mailing list