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 2009/11/04 16:53:49 UTC

svn commit: r832777 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java

Author: lofwyr
Date: Wed Nov  4 15:53:48 2009
New Revision: 832777

URL: http://svn.apache.org/viewvc?rev=832777&view=rev
Log:
TOBAGO-412: Cleanup: don't set the style with a string any longer (Deprecated)

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
    myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java?rev=832777&r1=832776&r2=832777&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java (original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/webapp/TobagoResponseWriter.java Wed Nov  4 15:53:48 2009
@@ -146,7 +146,9 @@
 
   /**
    * Write the style attribute. The value will not escaped.
+   * @deprecated since 1.5.0, use writeStyleAttribute(Style) instead.
    */
+  @Deprecated
   public void writeStyleAttribute(String style) throws IOException {
     writeAttribute(HtmlAttributes.STYLE, style, false);
   }

Modified: myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java?rev=832777&r1=832776&r2=832777&view=diff
==============================================================================
--- myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java (original)
+++ myfaces/tobago/trunk/sandbox/src/main/java/org/apache/myfaces/tobago/renderkit/html/sandbox/standard/tag/InputNumberSliderRenderer.java Wed Nov  4 15:53:48 2009
@@ -151,7 +151,12 @@
     // handle
     writer.startElement(HtmlConstants.DIV, null);
     writer.writeIdAttribute(getIdForSliderHandle(facesContext, slider));
-    writer.writeStyleAttribute("position:relative; top:-6px; width:12px; height:6px");
+    HtmlStyleMap handleStyle = new HtmlStyleMap();
+    handleStyle.setPosition("relative");
+    handleStyle.setTop(new PixelMeasure(-6));
+    handleStyle.setWidth(new PixelMeasure(12));
+    handleStyle.setHeight(new PixelMeasure(6));
+    writer.writeStyleAttribute(handleStyle); // todo: why not do that via the class?
     writer.startElement(HtmlConstants.IMG, null);
     writer.writeAttribute(HtmlAttributes.SRC, getAbsoluteImagePath(facesContext, "image/sliderTriangle.gif"), true);
     writer.endElement(HtmlConstants.IMG);