On Dec 3, 2011, at 12:26 PM, Eugen Colesnicov wrote:
I did it!
{{velocity}}
#set($class="XWiki.XWikiComments")
#set($name=$doc.fullName)
#set($xwlquery="select obj.comment from Document doc, doc.object($class) as
obj where doc.fullName='$doc.fullName' order by obj.date desc")
#set($list=$services.query.xwql($xwlquery).setLimit(1).execute())
#foreach($item in $list)
$item
#end
{{/velocity}}
cool, I've added it here:
http://extensions.xwiki.org/xwiki/bin/preview/Extension/Get+Last+Comment
Thanks
-Vincent