[seam-commits] Seam SVN: r8314 - branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/graphicImage.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Mon Jun 2 06:35:00 EDT 2008
Author: pete.muir at jboss.org
Date: 2008-06-02 06:35:00 -0400 (Mon, 02 Jun 2008)
New Revision: 8314
Modified:
branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/graphicImage/GraphicImageRendererBase.java
Log:
JBSEAM-2517 (thanks to Keith Naas!)
Modified: branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/graphicImage/GraphicImageRendererBase.java
===================================================================
--- branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/graphicImage/GraphicImageRendererBase.java 2008-06-02 01:55:59 UTC (rev 8313)
+++ branches/Seam_2_0/ui/src/main/java/org/jboss/seam/ui/graphicImage/GraphicImageRendererBase.java 2008-06-02 10:35:00 UTC (rev 8314)
@@ -46,10 +46,14 @@
extension = image.getContentType().getExtension();
writer.startElement(HTML.IMG_ELEM, graphicImage);
+ if (graphicImage.getId() != null)
+ {
+ writer.writeAttribute(HTML.ID_ATTR, graphicImage.getClientId(context), HTML.ID_ATTR);
+ }
+
String url = context.getExternalContext().getRequestContextPath()
+ GraphicImageResource.GRAPHIC_IMAGE_RESOURCE_PATH + "/" + key + extension;
writer.writeAttribute(HTML.SRC_ATTR, url, HTML.SRC_ATTR);
-
HTML.renderHTMLAttributes(writer, component, HTML.IMG_PASSTHROUGH_ATTRIBUTES);
writer.endElement(HTML.IMG_ELEM);
}
More information about the seam-commits
mailing list