You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Tim Colson <tc...@cisco.com> on 2002/01/06 23:36:21 UTC
RE: [BUG] Struts + Velocity + MathContextTool
> Apologies if this has been discussed before... backwater of my brain seems
> to recall something similar perhaps, but can't grasp it.
BTW - I do recall the big bunch of Floating point discussion and such... and
so I pretty much expected the functions to fail in some way, but the weird
things I noticed were in the escaped labels. ;-)
Timo
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [BUG] Struts + Velocity + MathContextTool
Posted by Tim Colson <tc...@cisco.com>.
Asked another way ->
How would I write this plain text in my template without the error?
"Attention Template Designers - do not do this : $math.min(1.5, 2.3) because
it will fail due to floating point numbers. What's a floating point number
and why should you care? That's a different thread. <grin>"
Cheers,
Tim
> -----Original Message-----
> From: Tim Colson [mailto:tcolson@cisco.com]
> Sent: Sunday, January 06, 2002 3:15 PM
> To: Velocity Users List
> Subject: RE: [BUG] Struts + Velocity + MathContextTool
>
>
> Geir -
> > Because the escaping of references is done at runtime, as you
> > can't tell at
> > parsetime what is a reference, as you need a context to decide that.
>
> uhh...could you run that through the "dumb-it-down" filter and
> tell me again
> why the escaped \$ in the label doesn't appear to be escaped and in fact
> causes an error?
> <td>\$math.min(345, 765.2)</td><td>$math.min(345, 765)</td>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: [BUG] Struts + Velocity + MathContextTool
Posted by Tim Colson <tc...@cisco.com>.
Geir -
> Because the escaping of references is done at runtime, as you
> can't tell at
> parsetime what is a reference, as you need a context to decide that.
uhh...could you run that through the "dumb-it-down" filter and tell me again
why the escaped \$ in the label doesn't appear to be escaped and in fact
causes an error?
<td>\$math.min(345, 765.2)</td><td>$math.min(345, 765)</td>
Thanks,
Tim
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: [BUG] Struts + Velocity + MathContextTool
Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
On 1/6/02 5:36 PM, "Tim Colson" <tc...@cisco.com> wrote:
>> Apologies if this has been discussed before... backwater of my brain seems
>> to recall something similar perhaps, but can't grasp it.
> BTW - I do recall the big bunch of Floating point discussion and such... and
> so I pretty much expected the functions to fail in some way, but the weird
> things I noticed were in the escaped labels. ;-)
> Timo
>
Because the escaping of references is done at runtime, as you can't tell at
parsetime what is a reference, as you need a context to decide that.
--
Geir Magnusson Jr. geirm@optonline.net
System and Software Consulting
"They that can give up essential liberty to obtain a little temporary safety
deserve neither liberty nor safety." - Benjamin Franklin
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>