[richfaces-svn-commits] JBoss Rich Faces SVN: r18321 - in root/sandbox: examples/components/inputnumberslider-demo/src/main/webapp and 5 other directories.

richfaces-svn-commits at lists.jboss.org richfaces-svn-commits at lists.jboss.org
Mon Aug 2 12:24:07 EDT 2010


Author: konstantin.mishin
Date: 2010-08-02 12:24:05 -0400 (Mon, 02 Aug 2010)
New Revision: 18321

Added:
   root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/PositionType.java
   root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowLeft.java
   root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowRight.java
Removed:
   root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/bg_field.gif
Modified:
   root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
   root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
   root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml
   root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
   root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
   root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml
Log:
RF-8983

Modified: root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java
===================================================================
--- root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/examples/components/inputnumberslider-demo/src/main/java/org/richfaces/demo/Bean.java	2010-08-02 16:24:05 UTC (rev 18321)
@@ -24,19 +24,30 @@
 import javax.faces.bean.ManagedBean;
 import javax.faces.bean.SessionScoped;
 
+import org.richfaces.renderkit.html.PositionType;
+
 @ManagedBean(name = "bean")
 @SessionScoped
 public class Bean {
 
-    private int value;
+    private double value;
     private String accesskey;
+    private int delay = 200;
     private boolean enableManualInput = true;
+    private PositionType inputPosition = PositionType.right;
+    private double maxValue = 100;
+    private double minValue = 0;
+    private boolean showArrows = false;
+    private boolean showBoundaryValues = true;
+    private boolean showInput = true;
+    private boolean showToolTip = true;
+    private double step = 1;
     
-    public void setValue(int value) {
+    public void setValue(double value) {
         this.value = value;
     }
 
-    public int getValue() {
+    public double getValue() {
         return value;
     }
 
@@ -48,6 +59,14 @@
         return accesskey;
     }
 
+    public int getDelay() {
+        return delay;
+    }
+
+    public void setDelay(int delay) {
+        this.delay = delay;
+    }
+
     public void setEnableManualInput(boolean enableManualInput) {
         this.enableManualInput = enableManualInput;
     }
@@ -55,4 +74,72 @@
     public boolean getEnableManualInput() {
         return enableManualInput;
     }
+
+    public void setInputPosition(PositionType inputPosition) {
+        this.inputPosition = inputPosition;
+    }
+
+    public PositionType getInputPosition() {
+        return inputPosition;
+    }
+
+    public PositionType[] getPositionTypes() {
+        return PositionType.values();
+    }
+
+    public double getMaxValue() {
+        return maxValue;
+    }
+
+    public void setMaxValue(double maxValue) {
+        this.maxValue = maxValue;
+    }
+
+    public double getMinValue() {
+        return minValue;
+    }
+
+    public void setMinValue(double minValue) {
+        this.minValue = minValue;
+    }
+    
+    public boolean isShowArrows() {
+        return showArrows;
+    }
+
+    public void setShowArrows(boolean showArrows) {
+        this.showArrows = showArrows;
+    }
+
+    public boolean isShowBoundaryValues() {
+        return showBoundaryValues;
+    }
+
+    public void setShowBoundaryValues(boolean showBoundaryValues) {
+        this.showBoundaryValues = showBoundaryValues;
+    }
+
+    public boolean isShowInput() {
+        return showInput;
+    }
+
+    public void setShowInput(boolean showInput) {
+        this.showInput = showInput;
+    }
+
+    public boolean isShowToolTip() {
+        return showToolTip;
+    }
+
+    public void setShowToolTip(boolean showToolTip) {
+        this.showToolTip = showToolTip;
+    }
+
+    public double getStep() {
+        return step;
+    }
+
+    public void setStep(double step) {
+        this.step = step;
+    }
 }

Modified: root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml
===================================================================
--- root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/examples/components/inputnumberslider-demo/src/main/webapp/index.xhtml	2010-08-02 16:24:05 UTC (rev 18321)
@@ -35,7 +35,10 @@
 	<h:body>
 		<h:form id="form">
 			<ins:inputnumberslider id="ins" value="#{bean.value}" accesskey="#{bean.accesskey}"
-				enableManualInput="#{bean.enableManualInput}"/>
+				delay="#{bean.delay}" enableManualInput="#{bean.enableManualInput}" showArrows="#{bean.showArrows}"
+				showBoundaryValues="#{bean.showBoundaryValues}" showInput="#{bean.showInput}"
+				showToolTip="#{bean.showToolTip}" maxValue="#{bean.maxValue}" minValue="#{bean.minValue}"
+				step="#{bean.step}" inputPosition="#{bean.inputPosition}"/>
 			<br />
 			<h:outputText value="Accesskey: "/>
 			<h:inputText value="#{bean.accesskey}">
@@ -45,7 +48,53 @@
 			<h:outputText value="EnableManualInput: "/>
 			<h:selectBooleanCheckbox value="#{bean.enableManualInput}">
 				<f:ajax render="ins"/>
-			</h:selectBooleanCheckbox>			
+			</h:selectBooleanCheckbox>
+			<br />
+			<h:outputText value="Delay: "/>
+			<h:inputText value="#{bean.delay}">
+				<f:ajax render="ins"/>
+			</h:inputText>
+			<br />
+			<h:outputText value="InputPosition: "/>
+			<h:selectOneMenu value="#{bean.inputPosition}">
+				<f:selectItems value="#{bean.positionTypes}"/>
+				<f:ajax render="ins"/>
+			</h:selectOneMenu>				
+			<br />
+			<h:outputText value="MaxValue: "/>
+			<h:inputText value="#{bean.maxValue}">
+				<f:ajax render="ins"/>
+			</h:inputText>
+			<br />
+			<h:outputText value="MinValue: "/>
+			<h:inputText value="#{bean.minValue}">
+				<f:ajax render="ins"/>
+			</h:inputText>
+			<br />
+			<h:outputText value="ShowArrows: "/>
+			<h:selectBooleanCheckbox value="#{bean.showArrows}">
+				<f:ajax render="ins"/>
+			</h:selectBooleanCheckbox>
+			<br />
+			<h:outputText value="ShowBoundaryValues: "/>
+			<h:selectBooleanCheckbox value="#{bean.showBoundaryValues}">
+				<f:ajax render="ins"/>
+			</h:selectBooleanCheckbox>
+			<br />
+			<h:outputText value="ShowInput: "/>
+			<h:selectBooleanCheckbox value="#{bean.showInput}">
+				<f:ajax render="ins"/>
+			</h:selectBooleanCheckbox>
+			<br />
+			<h:outputText value="ShowToolTip: "/>
+			<h:selectBooleanCheckbox value="#{bean.showToolTip}">
+				<f:ajax render="ins"/>
+			</h:selectBooleanCheckbox>
+			<br />
+			<h:outputText value="Step: "/>
+			<h:inputText value="#{bean.step}">
+				<f:ajax render="ins"/>
+			</h:inputText>
 		</h:form>
 	</h:body>
 </html>

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/config/faces-config.xml	2010-08-02 16:24:05 UTC (rev 18321)
@@ -38,6 +38,14 @@
 			</property-extension>
 		</property>
 		<property>
+			<property-name>delay</property-name>
+			<property-class>int</property-class>
+			<default-value>200</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
 			<property-name>enableManualInput</property-name>
 			<property-class>boolean</property-class>
 			<default-value>true</default-value>
@@ -46,14 +54,79 @@
 			</property-extension>
 		</property>
 		<property>
-			<property-name>trackClass</property-name>
-			<property-class>java.lang.String</property-class>
+			<property-name>inputPosition</property-name>
+			<property-class>org.richfaces.renderkit.html.PositionType</property-class>
+			<default-value>PositionType.right</default-value>
 			<property-extension>
 				<cdk:generate>true</cdk:generate>
 			</property-extension>
 		</property>
 		<property>
-			<property-name>trackStyle</property-name>
+			<property-name>maxValue</property-name>
+			<property-class>double</property-class>
+			<default-value>100</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>minValue</property-name>
+			<property-class>double</property-class>
+			<default-value>0</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>minValue</property-name>
+			<property-class>double</property-class>
+			<default-value>0</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>showArrows</property-name>
+			<property-class>boolean</property-class>
+			<default-value>false</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>showBoundaryValues</property-name>
+			<property-class>boolean</property-class>
+			<default-value>true</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>showInput</property-name>
+			<property-class>boolean</property-class>
+			<default-value>true</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>showToolTip</property-name>
+			<property-class>boolean</property-class>
+			<default-value>true</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>step</property-name>
+			<property-class>double</property-class>
+			<default-value>1</default-value>
+			<property-extension>
+				<cdk:generate>true</cdk:generate>
+			</property-extension>
+		</property>
+		<property>
+			<property-name>trackClass</property-name>
 			<property-class>java.lang.String</property-class>
 			<property-extension>
 				<cdk:generate>true</cdk:generate>

Added: root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/PositionType.java
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/PositionType.java	                        (rev 0)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/PositionType.java	2010-08-02 16:24:05 UTC (rev 18321)
@@ -0,0 +1,5 @@
+package org.richfaces.renderkit.html;
+
+public enum PositionType {
+    top, right, bottom, left
+}

Added: root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowLeft.java
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowLeft.java	                        (rev 0)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowLeft.java	2010-08-02 16:24:05 UTC (rev 18321)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ * 
+ */
+public class SliderSelectedArrowLeft extends SliderArrowLeft {
+    
+    public SliderSelectedArrowLeft() {
+        setColorName("tipBorderColor");
+    }
+}

Added: root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowRight.java
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowRight.java	                        (rev 0)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/java/org/richfaces/renderkit/html/images/SliderSelectedArrowRight.java	2010-08-02 16:24:05 UTC (rev 18321)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright ${year}, Red Hat, Inc. and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.richfaces.renderkit.html.images;
+
+
+/**
+ * @author Konstantin Mishin
+ * 
+ */
+public class SliderSelectedArrowRight extends SliderArrowRight {
+    
+    public SliderSelectedArrowRight() {
+        setColorName("tipBorderColor");
+    }
+}

Deleted: root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/bg_field.gif
===================================================================
(Binary files differ)

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.ecss	2010-08-02 16:24:05 UTC (rev 18321)
@@ -31,7 +31,7 @@
 	width: 200px; /*TODO remove it*/
 }
 
-.rf-ins-mn, .rf-ins-mx, .rf-ins-i, .rf-ins-tt {
+.rf-ins-mn, .rf-ins-mx, input.rf-ins-i, .rf-ins-tt {
 	font-size: 11px;
 	font-family: arial;
 	color: #000000;
@@ -56,9 +56,9 @@
 }
 
 input.rf-ins-i {
-	background: url("#{resource['bg_field.gif']}") top repeat-x #fff;
+	background: url("#{resource['org.richfaces.renderkit.html.images.InputBackgroundImage']}") top repeat-x #fff;
 	border: 1px inset #C0C0C0;
-	margin-left: 10px;
+	margin: 10px;
 }
 
 .rf-ins-tt {
@@ -92,6 +92,14 @@
 	background-image: url("#{resource['org.richfaces.renderkit.html.images.SliderArrowLeft']}");
 }
 
+.rf-ins-db-s {
+	background-image: url("#{resource['org.richfaces.renderkit.html.images.SliderSelectedArrowLeft']}");
+}
+
 .rf-ins-ib {
 	background-image: url("#{resource['org.richfaces.renderkit.html.images.SliderArrowRight']}");
+}
+
+.rf-ins-ib-s {
+	background-image: url("#{resource['org.richfaces.renderkit.html.images.SliderSelectedArrowRight']}");
 }
\ No newline at end of file

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/resources/META-INF/resources/inputNumberSlider.js	2010-08-02 16:24:05 UTC (rev 18321)
@@ -26,12 +26,13 @@
 	
 	    name: "InputNumberSlider",
 	    
+	    delay: 200,
+	    maxValue: 100,
 	    minValue: 0,
-	    maxValue: 100,
-	    step: 5,
-	    value: 0,
+	    step: 1,
 	
-	    init: function (id) {
+	    init: function (id, options) {
+			jQuery.extend(this, options);
 	        this.range = this.maxValue - this.minValue;
 	        this.id = id;
 	        this.element = jQuery(this.attachToDom());
@@ -39,32 +40,32 @@
 	        this.track = this.element.children(".rf-ins-ta").children(".rf-ins-t");
 	        this.handle = this.track.children(".rf-ins-h");
 	        this.tooltip = this.element.children(".rf-ins-tt");
+	        this.decrease = this.element.children(".rf-ins-db");
+	        this.increase = this.element.children(".rf-ins-ib");
 
-	        this.value = Number(this.input.val());
+	        this.__inputHandler();
         	this.track[0].tabIndex = 0;
-        	this.handle.css("margin-left", this.input.val() * (this.track.width() - this.handle.width()) / this.range);
 
         	var proxy = jQuery.proxy(this.__inputHandler, this)
 	        this.input.change(proxy);
 	        this.input.submit(proxy);
 	        this.track.keydown(jQuery.proxy(this.__keydownHandler, this));
-	        this.element.children(".rf-ins-db").mousedown(jQuery.proxy(this.__decreaseHandler, this));
-	        this.element.children(".rf-ins-ib").mousedown(jQuery.proxy(this.__increaseHandler, this));
+	        this.decrease.mousedown(jQuery.proxy(this.__decreaseHandler, this));
+	        this.increase.mousedown(jQuery.proxy(this.__increaseHandler, this));
 	        this.track.mousedown(jQuery.proxy(this.__mousedownHandler, this));
 	    },
 	
 	    setValue: function (value) {
 	    	if (!isNaN(value)) {
+	        	value = Math.round(value / this.step) * this.step; //TODO Add normal support of float values. E.g. '0.3' should be instead of '0.30000000000000004'.
 		        if (value > this.maxValue) {
 		        	value = this.maxValue;
 		        } else if (value < this.minValue) {
 		        	value = this.minValue;
-		        } else {
-		        	value = Math.round(value / this.step) * this.step; //TODO Add normal support of float values. E.g. '0.3' should be instead of '0.30000000000000004'.
 		        }
 		        if (value != this.value) {
 		        	this.input.val(value);
-		        	var left = value * (this.track.width() - this.handle.width()) / this.range;
+		        	var left = (value - this.minValue) * (this.track.width() - this.handle.width()) / this.range;
 		        	this.handle.css("margin-left", left + "px");
 		        	this.tooltip.text(value);
 		        	this.tooltip.setPosition(this.handle,{from: 'LT', offset: [0, -3]}); //TODO Seems offset doesn't work now.
@@ -93,13 +94,34 @@
 	    },
 	    
 	    __decreaseHandler: function (event) {
-		    this.setValue(Number(this.input.val()) - this.step);
+	    	var component = this;
+	    	this.intervalId = window.setInterval(function() {
+	    		component.setValue(Number(component.input.val()) - component.step);
+	    	}, this.delay);
+	    	jQuery(document).one("mouseup", true, jQuery.proxy(this.__clearInterval, this));
+	    	this.decrease.addClass("rf-ins-db-s");
+	    	event.preventDefault();
 	    },
 	    
 	    __increaseHandler: function (event) {
-		    this.setValue(Number(this.input.val()) + this.step);
+	    	var component = this;
+	    	this.intervalId = window.setInterval(function() {
+	    		component.setValue(Number(component.input.val()) + component.step);
+	    	}, this.delay);
+	    	jQuery(document).one("mouseup",jQuery.proxy(this.__clearInterval, this));
+	    	this.increase.addClass("rf-ins-ib-s");
+	    	event.preventDefault();
 	    },
 	    
+	    __clearInterval: function (event) {
+	    	window.clearInterval(this.intervalId);
+	    	if (event.data) { // increase
+	    		this.decrease.removeClass("rf-ins-db-s");
+	    	} else {
+	    		this.increase.removeClass("rf-ins-ib-s");
+	    	}
+	    },
+	    
 	    __mousedownHandler: function (event) {
 	    	this.__mousemoveHandler(event);
 	    	this.track.focus();

Modified: root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml
===================================================================
--- root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml	2010-08-02 15:31:36 UTC (rev 18320)
+++ root/sandbox/ui/inputs/inputnumberslider/src/main/templates/inputnumberslider.template.xml	2010-08-02 16:24:05 UTC (rev 18321)
@@ -24,7 +24,7 @@
 02110-1301 USA, or see the FSF site: http://www.fsf.org.
 -->
 <cdk:root xmlns="http://richfaces.org/cdk/xhtml-el" xmlns:cdk="http://richfaces.org/cdk/core"
-	xmlns:cc="http://richfaces.org/cdk/jsf/composite">
+	xmlns:cc="http://richfaces.org/cdk/jsf/composite" xmlns:c="http://richfaces.org/cdk/jstl/core">
 	<cc:interface>
 		<cdk:class>org.richfaces.renderkit.html.InputNumberSliderRenderer</cdk:class>
 		<cdk:superclass>org.richfaces.renderkit.InputRendererBase</cdk:superclass>
@@ -40,20 +40,50 @@
 	</cc:interface>
 	<cc:implementation>
 		<span id="#{clientId}" class="rf-ins">
-			<a class="rf-ins-db" href="javascript:void(0);" />
+			<c:if test="#{PositionType.valueOf('left') == component.attributes['inputPosition']
+				|| PositionType.valueOf('top') == component.attributes['inputPosition']}">
+				<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
+					value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"
+					readonly="#{!component.attributes['enableManualInput']}"
+					style="#{component.attributes['showInput'] ? null : 'display: none;'}" />
+				<c:if test="#{PositionType.valueOf('top') == component.attributes['inputPosition'] and component.attributes['showInput']}">
+					<br />
+				</c:if>
+			</c:if>
+			<c:if test="#{component.attributes['showArrows']}">
+				<a class="rf-ins-db" href="javascript:void(0);" />
+			</c:if>
 			<span class="rf-ins-ta">
-				<span class="rf-ins-mn">0</span>
-				<span class="rf-ins-mx">100</span>
-				<span class="rf-ins-t #{component.attributes['trackClass']}" style="#{component.attributes['trackStyle']}">
+				<c:if test="#{component.attributes['showBoundaryValues']}">
+					<span class="rf-ins-mn">#{component.attributes['minValue']}</span>
+					<span class="rf-ins-mx">#{component.attributes['maxValue']}</span>
+				</c:if>
+				<span class="rf-ins-t #{component.attributes['trackClass']}">
 					<span class="rf-ins-h" />
 				</span>
 			</span>
-			<a class="rf-ins-ib" href="javascript:void(0);" />
-			<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
-				value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"
-				readonly="#{!component.attributes['enableManualInput']}"/>
-			<span class="rf-ins-tt">#{getInputValue(facesContext, component)}</span>
-			<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}');</script>
+			<c:if test="#{component.attributes['showArrows']}">
+				<a class="rf-ins-ib" href="javascript:void(0);" />
+			</c:if>
+			<c:if test="#{PositionType.valueOf('right') == component.attributes['inputPosition']
+				|| PositionType.valueOf('bottom') == component.attributes['inputPosition']}">
+				<c:if test="#{PositionType.valueOf('bottom') == component.attributes['inputPosition'] and component.attributes['showInput']}">
+					<br />
+				</c:if>
+				<input name="#{clientId}" type="text" class="rf-ins-i" size="3"
+					value="#{getInputValue(facesContext, component)}" accesskey="#{component.attributes['accesskey']}"
+					readonly="#{!component.attributes['enableManualInput']}"
+					style="#{component.attributes['showInput'] ? null : 'display: none;'}" />
+			</c:if>
+			<c:if test="#{component.attributes['showToolTip']}">
+				<span class="rf-ins-tt">#{getInputValue(facesContext, component)}</span>
+			</c:if>
+			<script type="text/javascript">new RichFaces.ui.InputNumberSlider('#{clientId}', {
+				delay: #{component.attributes['delay']},
+				maxValue: #{component.attributes['maxValue']},
+				minValue: #{component.attributes['minValue']},
+				step: #{component.attributes['step']}
+			});</script>
 		</span>
 	</cc:implementation>
 </cdk:root>



More information about the richfaces-svn-commits mailing list