You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lo...@apache.org on 2011/07/06 16:12:12 UTC

svn commit: r1143426 - /myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java

Author: lofwyr
Date: Wed Jul  6 14:12:12 2011
New Revision: 1143426

URL: http://svn.apache.org/viewvc?rev=1143426&view=rev
Log:
TOBAGO-1013: The Progressbar is not rendered properly with a value of 0. The right border is not displayed.
 - Setting the width via style and not directly fixes the problem

Modified:
    myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java?rev=1143426&r1=1143425&r2=1143426&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java (original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ProgressRenderer.java Wed Jul  6 14:12:12 2011
@@ -24,7 +24,6 @@ package org.apache.myfaces.tobago.render
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
 import org.apache.myfaces.tobago.component.UICommand;
 import org.apache.myfaces.tobago.component.UIProgress;
 import org.apache.myfaces.tobago.context.ResourceManagerUtil;
@@ -42,6 +41,8 @@ import javax.swing.BoundedRangeModel;
 import javax.swing.DefaultBoundedRangeModel;
 import java.io.IOException;
 
+import static org.apache.myfaces.tobago.TobagoConstants.ATTR_TIP;
+
 public class ProgressRenderer extends LayoutableRendererBase {
 
   private static final Log LOG = LogFactory.getLog(ProgressRenderer.class);
@@ -94,7 +95,7 @@ public class ProgressRenderer extends La
     writer.writeClassAttribute(color1Classes);
     writer.writeAttribute(HtmlAttributes.SRC, image, false);
     writer.writeAttribute(HtmlAttributes.ALT, String.valueOf(title), true);
-    writer.writeAttribute(HtmlAttributes.WIDTH, width1, false);
+    writer.writeAttribute(HtmlAttributes.STYLE, "width:" + width1 + "px", false);
     writer.writeAttribute(HtmlAttributes.BORDER, 0);
     writer.endElement(HtmlConstants.IMG);
 
@@ -105,7 +106,7 @@ public class ProgressRenderer extends La
     writer.writeClassAttribute(color2Classes);
     writer.writeAttribute(HtmlAttributes.SRC, image, false);
     writer.writeAttribute(HtmlAttributes.ALT, String.valueOf(title), true);
-    writer.writeAttribute(HtmlAttributes.WIDTH, width2, false);
+    writer.writeAttribute(HtmlAttributes.STYLE, "width:" + width2 + "px", false);
     writer.writeAttribute(HtmlAttributes.BORDER, 0);
     writer.endElement(HtmlConstants.IMG);