-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi guys,
I have a very annoying and urgent problem with the slider component. In my ViewModel the data is a Double number:
public Double getPotentialRisk() {
return potentialRisk;
}
public void setPotentialRisk(Double potentialRisk) {
this.potentialRisk = potentialRisk;
}
I have declared a slider like this:
<slider mode="decimal" maxpos="5.0" step="0.5" curpos="@bind(vm.potentialRisk)" />
When the page is initially loaded, the slider represents the correct decimal value (e.g 2.5) but after scrolling the slider, the returned value is always integer. Also, while i am scrolling, the tooltip shows the correct value (e.g 4.5) but after the value is updated the slider returns to the nearest int value (e.g. 4.0).
I am using ZK 7.0.2 and tested with ZK 7.0.3 eval
Even without data binding it seems that it is not possible to set the slider's position at a decimal place. Setting the value to "2.5" will set the slider at position "2.0".
I don't know whether it is a bug or i am missing something else.
Please help, Costas
It has been confirmed as a bug http://tracker.zkoss.org/browse/ZK-2419
Unfortunately the workaround is not working. The slider does not work in 'decimal' mode at all. When you drag the handle (for example with step="0.5" and maxpos="5.0") the values are invalid. You cannot select for example the value 3.5. Only 3.4 and 3.6 are available.
Hope there will be a fix in the upcoming version 7.0.3
Thanks again Costas
Asked: 2014-08-27 12:18:09 +0800
Seen: 13 times
Last updated: Aug 29 '14
adding a menuitem with image on Menubar
can somebody give the use of imagecontent in menuitem ? [closed]
label in org.zkoss.zul.Messagebox must be middle aligned [closed]
Grid with frozen column shows unnecessary scrollbar
Component with independents columns
ZK ComboBox constraint firing on getSelectIndex()
Problems with visible/invisible grids using flex
A container should have a disable attribute.
Video inside: Processing... not translated to set org.zkoss.web.preferred.locale in zk.xml