velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Ridwan" <>
Subject Problem with $velocityHasNext in Spring
Date Mon, 23 Feb 2009 04:03:10 GMT
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 ) |


                        <td class=b><a
href="keypagelist.htm?offset=$pagerLink">$value</a>#if( $velocityHasNext ) |





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


I tried to explicitly include the following directive in my own file: = velocityHasNext

but it made no difference.


Grateful for any ideas.


Eddie Ridwan



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message