Menu

#2737 DoubleSpinner's ClassCastException on value get

5.0.7
closed-fixed
nobody
5
2011-07-06
2011-06-25
Evilsun
No

Hi ,
I have doublespinner component defined in zul :

<doublespinner id="tbSpamThreshold" mold="rounded" constraint="no negative, min 0.00, max 1.00"/>

and entering numbers such 0.01 , 0.03 , etc , then i trying to get it's value in controller ( tbSpamThreshold.getValue() ) it fails with :

SEVERE: >>java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Double
>> at org.zkoss.zul.Doublespinner.coerceFromString(Doublespinner.java:133)
>> at org.zkoss.zul.impl.InputElement.setText(InputElement.java:270)
>> at org.zkoss.zul.impl.InputElement.checkUserError(InputElement.java:639)
>> at org.zkoss.zul.impl.InputElement.getTargetValue(InputElement.java:478)
>> at org.zkoss.zul.Doublespinner.getValue(Doublespinner.java:60)

Discussion

  • Simon Pai

    Simon Pai - 2011-07-04
    • labels: 819098 --> Components
    • milestone: --> 5.0.7
    • status: open --> closed-fixed
     
  • Simon Pai

    Simon Pai - 2011-07-04

    Fixed since 2011/7/4.

     
  • Evilsun

    Evilsun - 2011-07-05

    But i can repeat it on the live demo running on ZK 5.0.7 released on May 11, 2011.
    Or this fix is not included to ZK 5.0.7 ?

     
  • Evilsun

    Evilsun - 2011-07-05
    • status: closed-fixed --> open-fixed
     
  • Simon Pai

    Simon Pai - 2011-07-06
    • status: open-fixed --> closed-fixed
     

Log in to post a comment.