Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,366,199
Community Members
 
Community Events
168
Community Groups

how to get the number of items in a velocity array list?

I have some useful user macros to help me administrating our wiki.

I would like to get quickly the total size of users from the user store. I cant get a list of all users with that method:

$userAccessor.getUsers()

But how can I get the size of the list without looping it by foreach?

2 answers

$array.size() works
0 votes

This should work.

$userAccessor.getUsers().size()

Oh wait! It doesn't actually return an array, so .size() won't work. I think you might have to loop through it.

Many thanks. The size() methode I tried also without success. So looping is the only solution?

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events