You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ar...@apache.org on 2007/08/30 18:49:21 UTC
svn commit: r571240 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java
Author: arobinson74
Date: Thu Aug 30 09:49:20 2007
New Revision: 571240
URL: http://svn.apache.org/viewvc?rev=571240&view=rev
Log:
Fix the table style rendering to use more CSS to get it to work a lot more cleanly for IE
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java?rev=571240&r1=571239&r2=571240&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/roundeddiv/HtmlRoundedDivRenderer.java Thu Aug 30 09:49:20 2007
@@ -689,21 +689,26 @@
writer.writeAttribute(HTML.CLASS_ATTR, area, null);
if (areas.contains(area))
{
- writer.startElement(HTML.IMG_ELEM, component);
- writer.writeAttribute(HTML.SRC_ATTR, getImageSource(context,
- component, area), null);
+ StringBuffer style = new StringBuffer("font-size: 1px; background-image: url('")
+ .append(getImageSource(context,
+ component, area)).append("');")
+ .append("background-position: top left;");
+
if ("left".equals(area) || "right".equals(area))
{
- writer.writeAttribute(HTML.HEIGHT_ATTR, "100%", null);
- writer.writeAttribute(HTML.WIDTH_ATTR, padding + "px", null);
+ style.append("background-repeat: repeat-y; width: ")
+ .append(padding).append("px;");
}
else if ("top".equals(area) || "bottom".equals(area))
{
- writer.writeAttribute(HTML.WIDTH_ATTR, "100%", null);
- writer.writeAttribute(HTML.HEIGHT_ATTR, padding + "px", null);
+ style.append("background-repeat: repeat-x; height: ")
+ .append(padding).append("px;");
}
+
+ writer.writeAttribute(HTML.STYLE_ATTR, style, null);
- writer.endElement(HTML.IMG_ELEM);
+ // force the browser to allocate this column in rendering
+ writer.write(" ");
}
writer.endElement(HTML.TD_ELEM);
}