Author: sergeyhalipov
Date: 2008-03-13 11:47:40 -0400 (Thu, 13 Mar 2008)
New Revision: 6786
Modified:
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java
Log:
http://jira.jboss.com/jira/browse/RF-2488
Modified:
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java
===================================================================
---
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java 2008-03-13
15:44:45 UTC (rev 6785)
+++
trunk/ui/inputnumber-slider/src/main/java/org/richfaces/component/UIInputNumberSlider.java 2008-03-13
15:47:40 UTC (rev 6786)
@@ -21,7 +21,9 @@
package org.richfaces.component;
+import org.richfaces.component.util.HtmlUtil;
+
/**
* JSF component class
*
@@ -30,21 +32,33 @@
public static final String COMPONENT_TYPE =
"org.richfaces.inputNumberSlider";
+ public abstract String getWidth();
+ public abstract void setWidth(String width);
+
+ public abstract String getHeight();
+ public abstract void setHeight(String height);
+
+ public abstract String getStyle();
+ public abstract void setStyle(String style);
+
public String getStyleValue() {
StringBuffer buf = new StringBuffer();
- String width = (String)getAttributes().get("width");
- String height = (String)getAttributes().get("height");
- String style = (String)getAttributes().get("style");
- if (width!=null&&width.length()>0) {
- buf.append("width:"+width);
+ String width = getWidth();
+ String height = getHeight();
+ String style = getStyle();
+ if (width != null && width.length() > 0) {
+ buf.append("width:" + HtmlUtil.qualifySize(width));
buf.append(";");
}
- if (height!=null&&height.length()>0) {
- buf.append("height:"+height);
+ if (height !=null && height.length() > 0) {
+ buf.append("height:" + HtmlUtil.qualifySize(height));
buf.append(";");
}
- buf.append(style);
+ if (style !=null && style.length() > 0) {
+ buf.append(style);
+ }
+
return buf.toString();
}