You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Aurélien DEHAY <ad...@zorel.org> on 2004/12/16 23:02:25 UTC
Problem with flows and integers
Hello.
Strange behaviour with flows, and VERY frustrating. I have a number
(say, 1). In a flow function, I simply do var n = 1;
I'd like to use the n value in a jxpath file. But in my jxpath file, The
value is becomed 1.0. Not 1. It's not a problem with jx:number.
But in my XSP file with jpath logicsheet, IT IS a big problem: I can't
no longer do a insert via esql (1.0 is not an integer).
How can I make the conversion in the flow (I've tried parseInt on the
var, it does not work)?? Do I have to do the conversion in my xsp file?
I'm using cocoon 2.1.6.
Rgds.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem with flows and integers
Posted by Aurélien DEHAY <ad...@zorel.org>.
Upayavira wrote:
>
> You could try var foo = new java.lang.Integer(xxx). Actually use a Java
> integer rather than a javascript object.
Works fine, many thanks...
Rgds.
>
> Regards, Upayavira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Problem with flows and integers
Posted by Upayavira <uv...@upaya.co.uk>.
Aurélien DEHAY wrote:
> Hello.
>
> Strange behaviour with flows, and VERY frustrating. I have a number
> (say, 1). In a flow function, I simply do var n = 1;
>
> I'd like to use the n value in a jxpath file. But in my jxpath file,
> The value is becomed 1.0. Not 1. It's not a problem with jx:number.
>
> But in my XSP file with jpath logicsheet, IT IS a big problem: I can't
> no longer do a insert via esql (1.0 is not an integer).
>
> How can I make the conversion in the flow (I've tried parseInt on the
> var, it does not work)?? Do I have to do the conversion in my xsp file?
>
> I'm using cocoon 2.1.6.
You could try var foo = new java.lang.Integer(xxx). Actually use a Java
integer rather than a javascript object.
Regards, Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org