You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tobia Conforto <to...@linux.it> on 2007/08/01 01:20:31 UTC

Re: [Flowscript] everything converted to "number" type?

Mark Lundquist wrote:
> I've got some CForms widgets of <datatype base="long"/>, so I expect
> that the widget value should be a java.lang.Long, right?

Widget's getValue() returns an Object, so that would make sense, yes.


> it seems like every reference to the widget value gets converted to a
> JS "number" type

Probably because all Java number types (including their wrapping objects
in java.lang) get converted to a JS Number, which sounds reasonable BTW.
I suppose you could find notes on the type mapping between Java and JS
on Rhino's website.  Rhino is the Javascript interpreter used by Cocoon.

Now, if it also converted java.lang.String to JS strings automatically,
it would have spared me many a headache... unfortunately that's a
conversion that Rhino seems reluctant to do.


> and truncated to an integer value.

I believe that a Java long is an integer type.


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org