cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <j.heini...@ewerk.com>
Subject [flowscript] How to set an integer value in the FlowScript?
Date Wed, 28 Jan 2004 13:28:30 GMT
I have a little problem when setting a value of a Woody widget which is type
integer in the FlowScript:
"Tried to set value of output widget "repeater.offset" with an object of an
incorrect type: expected class java.lang.Integer, received class
java.lang.Double."

The JavaScript code is simple:
offsetWidget.value = 0;

I tried to enforce the datatype integer in the JavaScript by changing it to:
offsetWidget.value = parseInt(0);
but had no success.

Now I tried to access the error on the other end by changing the Woody
definition and binding. As there is no double datatype I tried float with the
following result:
"Tried to set value of output widget "repeater.offset" with an object of an
incorrect type: expected class java.lang.Float, received class
java.math.BigDecimal."
That was not what I expected! Also this error occurs on binding load time, not
when I set the value. Is this a bug??

Next try was to set the datatype in Woody definition and binding to "decimal",
but here I'm back at the expected error message: "expected class
java.math.BigDecimal, received class java.lang.Double".

How to fix it?

Joerg


Mime
View raw message