Thanks for the new code Sergiu - client reports it working fine
I will update the FAQ with the new version
-----Original Message-----
From: users-bounces(a)xwiki.org [mailto:users-bounces@xwiki.org]On Behalf
Of Edward Laptop
Sent: 05 November 2008 11:03
To: XWiki Users
Subject: [xwiki-users] ordering attachements not working`
Sometime ago I was given this code to add to attachmentsinline.vm
#set($attachmentsMap = $util.hashMap)
#foreach($a in $attachments)
#set($discard = $attachmentsMap.put($a.date, $a))
#end
#set($dates = $util.arrayList)
#foreach($date in $attachmentsMap.keySet())
#set($discard = $dates.add($date))
#end
#set($dates = $util.sort($dates))
#set($dates = $util.reverseList($dates))
#set($attachments = $util.arrayList)
#foreach($date in $dates)
#set($discard = $attachments.add($attachmentsMap.get($date)))
#end
this works fine, putting the attachments in order on my local server
However, my client (running XWiki Enterprise 1.5.1.12494) reports that it
doesn't show all the attachments. He has one page with about 10 attachments,
only 5 of which show. If he takes the code out all the attachments are
there, but not in date order which he wants.
can anyone please help.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users