You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Jason van Zyl <jv...@apache.org> on 2001/04/20 14:59:40 UTC

Re: #set ["sdfsdf","sdfsdf"] -- Access Entry #2?

Jeremy Cowgar wrote:
> 
> In my .vm file, I said this:
> 
> #set ($statusText = ["Untouched","Completed","Waiting on Someone Else"])
> 
> How do I access just element number 2 for instance?
> 
> $statusText.elementAt(2), $statusText(2), $statusText[2] was all I could
> come up with and none worked.

Internally velocity makes an ArrayList with the [..] operator.
So

$statusText.get(1)

is what you want.

> 
> Thanks!
> 
> Jeremy - jcowgar@bhsys.com
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org

-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://jakarta.apache.org/commons
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org