Slider

UI Components for JSF
Post Reply
bolsover
Posts: 7
Joined: 06 Apr 2009, 10:21

06 Apr 2009, 10:26

I am evaluating the use of PrimeFaces for a new project and am particularly interested in the slider component.
While testing the slider I find that whilst I can set an initial value of 0, once activated the lowest figure I can adjust the slider to is 1 and negative numbers do not appear to be allowed.
I am interested in a slider control that will allow numbers from -100 to 100 - is this possible?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

09 Apr 2009, 10:04

left and right property is used for that.

left=-100 right=100 should do it.

http://primefaces.prime.com.tr/docs/tld ... lider.html

User avatar
ydarcin
Posts: 258
Joined: 04 Jan 2009, 19:02
Location: Turkey

10 Apr 2009, 13:46

Hi,

found a bug in yui's slider, so I am fixing it right now. will be fixed shortly. I will write here when it is fixed.

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

17 Apr 2009, 01:02

Yigit add some new features to the slider, now slider can move to negative values as well. An example;

Code: Select all

<h:inputText id="txt2" value="#{sliderBean.number2}"></h:inputText>
<p:slider left="-100" right="100" for="txt2" />
You can grab this feature from the 0.8.3-SNAPSHOT which is at;

http://repository.prime.com.tr/org/prim ... -SNAPSHOT/

brooksie
Posts: 18
Joined: 21 Feb 2012, 23:09

02 Apr 2013, 10:51

Slider allows negative values, but you can't enter a negative value into the associated input text field. For example I can't set the temperature as -25 in the textbox in the example below (although I can set it with the slider). The textbox only allows digits.

Code: Select all

               <h:panelGrid columns="1" style="margin-bottom:10px">
                        <p:inputText id="txt4" value="#{sliderBean.number4}"/>
                        <p:slider for="txt4" minValue="-40" maxValue="212" />
                    </h:panelGrid>
PrimeFaces 4.0 | PFE 1.2.1. | GlassFish 4.0 | Mojarra 2.2.6
NetBeans 8.0 | JDK 8

moxprox
Posts: 20
Joined: 15 Sep 2012, 10:40

21 Aug 2013, 16:17

Yes indeed. I have the same problem. I tried to set the inputtext to

Code: Select all

<f:convertNumber integerOnly="true" />
but that did not help. Has an issue being created yet?

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

21 Aug 2013, 17:07

please create a new topic


can someone lock this one?

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 67 guests