You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Kevin Ward <ke...@kevinandliz.com> on 2004/08/10 20:08:17 UTC
operations on numbers from getters
In the context of a page I have placed an object (granule) which has a
method getFileSizeMB() that returns a Double. In that page I am trying the
following:
#set ( $fileSize = $granule.getFileSizeMB() * 1000000 )
and I get an error saying that the right side is null. I can do
#set ( $fileSize = $granule.getFileSizeMB() )
and that evaluates correctly, so obviously the problem lies in the
operation. In the Velocity documentation it mentions that integers (little
'i') are permissible for math functions. Does this mean that the operation
is failing because it is a Double?
Thanks,
Kevin
---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org