How to get the output of the first item in your query in Velocity -


how output of first item in query in velocity. example, if query $items , contains many objects, how first one?

i tried $items(1) not answer. suggestions? thank you.

in programming languages, the first element in vector 0, not 1.

in programming languages, round brackets mean function invocation, square brackets mean accessing indexed position vector. so, try $items[0].

also, velocity wrapper real java objects. so, if $items object indeed array-like, should use standard accessor method java lists: $items.get(0).


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -