s:graphicImage + ie6 weirdness
joconnor22 Jan 26, 2009 10:19 PMHi all,
I have a rich:datalist outputting a bunch of entities from the database; each entity has an associated Image entity that has a blob containing the data for the PNG - everything works fine except in ie6.
In ie6, when the list is rendered, some of the s:graphicImages are rendered, some are not...if I refresh the page, some of the 'missing' images may appear (or not) and some of the ones that were rendered previously may disappear (or not). All of the images do exist, and if I hit the 'back' button and then use 'forward' to get back to the list ALL of the images are displayed. I've seen similar threads in this forum but nothing that seems to have addressed this ie6 specific issue. (FF3, IE7 both render everthing fine when the page loads).
<rich:dataTable var="item" value="#{items.items}" rendered="#{items.items.size > 0}" width="100%"> <rich:column width="30" style="text-align: center;"> <s:graphicImage alt="#{item.name}" title="#{item.name}" rendered="#{item.image != null}" value="#{item.image.data.binaryStream}" height="20" width="20"> <s:transformImageSize width="20" height="20"/> </s:graphicImage> </rich:column> <rich:column> <f:facet name="header">Application Name</f:facet> <h:ouputText value="#{content.name}"/> </rich:column> </rich:dataTable>
The items bean looks like this: (note: this originally used the @factory pattern, but it produced the same results - missing images 'sometimes' in IE6 only, which would appear if you went 'Back' then 'Forward')
@Stateful @Scope(ScopeType.EVENT) @Name("items") public class ItemsBean implements Applications { @PersistenceContext EntityManager entityManager; public List getItems(){ List contents = entityManager.createQuery("from Items").getResultList(); return contents; } }
The data on the Image entity is defined as: (db is Oracle 11g)
@Entity @Table(name = "IMAGE") public class Image implements java.io.Serializable { private Blob data; @Column(name = "DATA", nullable = false) @NotNull public Blob getData() { return this.data; } public void setData(Blob data) { this.data = data; } }
As I said, the weirdest part for me is when I hit the back button and then navigate forward ALL the images are visible. Any help on an attack vector for this problem would be appreciated...thanks.
James