Hello,
So only by using the tools i can use lists and sort right?
this code should work:
$dateList.add($date) //it populates
$sorter.sort($dateList,["${date}:asc"]) //does not sort
##Collections.sort($dateList)
vmassol wrote:
On Dec 3, 2009, at 10:02 AM, Flavius Olaru wrote:
In velocity you don't have the keywork *new*.
You should use the
variable
$util to declare a list.
$util is deprecated and yes indeed you should use the $listtool.
Doc is here:
http://velocity.apache.org/tools/releases/1.4/javadoc/org/apache/velocity/t…
To creare a list in velocity:
#set ($myvar = [])
Thanks
-Vincent
#set($dateList = $util.arrayList)
$dateList.add($dateD)
And on operations with lists you use $listttool.
$listtool.size($dateList)
Best regards,
Flavius Olaru
On Thu, Dec 3, 2009 at 10:50 AM, Bubulina <nohinder(a)yahoo.com> wrote:
hello
this is by far the most easiest thing ... but
i have some data that i want to simple add in a list
#set($dateList = new ArrayList() )
$dateList.add($dateD)
whyyy is this wrong? how do i else declare a list ? cause it does
not work
thank you
--
View this message in context:
http://n2.nabble.com/simple-declare-a-list-in-velocity-tp4104854p4104854.ht…
Sent from the XWiki- Users mailing list archive at
Nabble.com.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users