Which version of Velocity?  $velocityHasNext doesn't work right in 1.6
and is absent in earlier versions.  You should use 1.6.2.

On Tue, Mar 31, 2009 at 8:34 AM, Steve Cohen <sco...@javactivity.org> wrote:
> Given this macro, which will only be called with lists of size >=2 and whose
> members are Strings representing dates
>
> #if ( $list.size() == 2)
> #foreach( $member in $list )#if( $velocityHasNext )${member}#else and
> ${member}#end#end
> #else
> #foreach( $member in $list )#if( $velocityHasNext )${member}, #else and
> ${member}#end#end
> #end
>
> I was expecting output of
> Mar 30, 2009 and Mar 31, 2009
>
> Instead, I am getting
>
> Mar 30, 2009Mar 31, 2009
>
> This result makes no sense to me, unless I am misunderstanding the use of
> $velocityHasNext.
>
> Can someone tell me what I am doing wrong?
>
> Thanks.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
> For additional commands, e-mail: user-h...@velocity.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@velocity.apache.org
For additional commands, e-mail: user-h...@velocity.apache.org

Reply via email to