Hi Joep,
The displayer has the objective of getting the "html" output of the field.
To get the actual value you should use
$obj.getProperty("property").getValue()
It should return you an Integer object (or Long or Double)
$obj.getProperty("property").getValue().intValue()
should give you an 'int'
Be carefull because velocity only handles 'int' for calculations
Ludovic
jjanssen(a)nl.swets.com a écrit :
Hello,
I've created an class with a property defined as a number. Hower, when I retrieve an
object in my XWiki document, $doc.display("property", "view", $obj)
will return me a String. This prevents my from adding the property values of several
objects.
So how to retrieve an number property as a number in a XWiki document.
Thanks,
Joep Janssen
------------------------------------------------------------------------
--
You receive this message as a subscriber of the xwiki-users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic