Author: wesleyhales
Date: 2007-07-18 21:56:12 -0400 (Wed, 18 Jul 2007)
New Revision: 1691
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
Log:
RF-474
Modified:
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java
===================================================================
---
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2007-07-18
22:52:23 UTC (rev 1690)
+++
trunk/ui/dataFilterSlider/src/main/java/org/richfaces/component/UIDataFltrSlider.java 2007-07-19
01:56:12 UTC (rev 1691)
@@ -200,20 +200,29 @@
public String getSliderRange() {
String sliderValues = "";
- int j = 0;
+
int segmentTotal;
+ int segmentTotalStart;
if (getStartRange().intValue() == 0) {
segmentTotal = (getEndRange().intValue() / getIncrement().intValue());
+ //set slider start to 0
+ segmentTotalStart = 0;
} else {
//subtract 1 for 0 based array
segmentTotal = (getEndRange().intValue() / getIncrement().intValue()) - 1;
+ //set the slider start for the loop
+ segmentTotalStart = getStartRange().intValue();
}
+ int j = segmentTotalStart;
- for (int i = 0; i <= segmentTotal; i++) {
+ for (int i = segmentTotalStart; i <= segmentTotal; i++) {
if (i != 0) {
- //increment by number given
- j = j + getIncrement().intValue();
+ //Check to see if we are at start of slider
+ if (i != j){
+ //increment by number given
+ j = j + getIncrement().intValue();
+ }
} else {
//start at specified range
j = getStartRange().intValue();
Show replies by date