I have h: graphicImage in a composite component like this:
<composite:interface> <composite:attribute name="name" required="true" type="java.lang.String" /> <composite:attribute name="alt" required="false" type="java.lang.String" /> <composite:attribute name="height" required="false" type="java.lang.String" /> <composite:attribute name="width" required="false" type="java.lang.String" /> </composite:interface> <composite:implementation> <h:graphicImage url="something-common#{cc.attrs.name}" alt="#{cc.attrs.alt}" height="#{cc.attrs.height}" width="#{cc.attrs.width}" /> </composite:implementation>
This works, however, if some attributes are not set (for example, width, height), they are displayed empty. In IE9 on win7, this causes the width and height attribute of the img tag to display as 1. Thus, the images are 1px wide and 1px high.
Filip majernik
source share