velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nbu...@gmail.com>
Subject Re: Problem with $velocityHasNext in Spring
Date Fri, 27 Feb 2009 05:54:49 GMT
That would be because $velocityHasNext was introduced in Velocity
1.6.x.  It doesn't exist in Velocity 1.5.

On Sun, Feb 22, 2009 at 8:03 PM, Eddie Ridwan <eddie.ridwan@zoominti.com> wrote:
> I am using Velocity views in Spring 2.5 (velocity-1.5.jar). The problem I
> have is that $velocityHasNext does not seem to be recognized as a foreach
> loop variable.
>
>
>
> Here is my template excerpt:
>
>
>
>            #foreach ($pagerLink in $resultpage.getPagerLinks())
>
>                  #set ($value = $resultpage.getStartPage() + $velocityCount
> - 1)
>
>                  #if ($resultpage.getCurrentPage() == $velocityCount)
>
>                        <td class=b>$value #if( $velocityHasNext ) |
> #end</td>
>
>                  #else
>
>                        <td class=b><a
> href="keypagelist.htm?offset=$pagerLink">$value</a>#if( $velocityHasNext ) |
> #end</td>
>
>                  #end
>
>                        $resultpage.getPagerLinks().size()*$velocityCount*
> [$velocityHasNext]
>
>            #end
>
>
>
> None of the #if statements recognizes $velocityHasNext.
>
> In the debugging line:
>
>  $resultpage.getPagerLinks().size()*$velocityCount* [$velocityHasNext]
>
> $velocityCount is correctly resolved to the current item count, but
> $velocityHasNext is not resolved and is merely rendered as the text
> "$velocityHasNext".
>
>
>
> I tried to explicitly include the following directive in my own
> velocity.properties file:
>
> directive.foreach.iterator.name = velocityHasNext
>
> but it made no difference.
>
>
>
> Grateful for any ideas.
>
>
>
> Eddie Ridwan
>
>
>
>
>
>

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


Mime
View raw message