velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eddie Ridwan" <eddie.rid...@zoominti.com>
Subject RE: Problem with $velocityHasNext in Spring
Date Fri, 27 Feb 2009 06:29:56 GMT
That explains it. Thanks, Nathan.

-----Original Message-----
From: Nathan Bubna [mailto:nbubna@gmail.com] 
Sent: Friday, 27 February 2009 4:55 PM
To: Velocity Users List
Subject: Re: Problem with $velocityHasNext in Spring

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

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.0.237 / Virus Database: 270.11.3/1974 - Release Date: 02/26/09
14:51:00


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


Mime
View raw message