Author: abelevich
Date: 2011-01-27 09:08:35 -0500 (Thu, 27 Jan 2011)
New Revision: 21278
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
Log:
RF-10262 Accordion: two icons displayed in each item
Modified:
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java
===================================================================
---
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-27
14:00:38 UTC (rev 21277)
+++
trunk/ui/output/ui/src/main/java/org/richfaces/renderkit/html/TableIconsRendererHelper.java 2011-01-27
14:08:35 UTC (rev 21278)
@@ -117,7 +117,7 @@
if (icon != null) {
encodeDivIcon(writer, icon, styleClass, state);
} else {
- encodeImage(writer, context, attrIconValue);
+ encodeImage(writer, context, attrIconValue, styleClass);
}
}
}
@@ -128,9 +128,10 @@
writer.endElement(DIV_ELEM);
}
- public static void encodeImage(ResponseWriter writer, FacesContext context, String
attrIconValue) throws IOException {
+ public static void encodeImage(ResponseWriter writer, FacesContext context, String
attrIconValue, String styleClass) throws IOException {
writer.startElement(IMG_ELEMENT, null);
writer.writeAttribute(ALT_ATTRIBUTE, "", null);
+ writer.writeAttribute(CLASS_ATTRIBUTE, styleClass, null);
writer.writeURIAttribute(SRC_ATTRIBUTE,
RenderKitUtils.getResourceURL(attrIconValue, context), null);
writer.endElement(IMG_ELEMENT);
}
Show replies by date