-
FEATURED COMPONENTS
First time here? Check out the FAQ!
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)
Is such behaviour can be fixed somehow or this is a bug ?
I would call it a bug... even if you're entering a 1 into the doublespinner and retrieve #getValue() or #doubleValue(), it throws the ClassCastException.
Please file a bug report.
Cheers, Maik
Asked: 2011-06-24 08:27:18 +0800
Seen: 264 times
Last updated: Jun 24 '11