velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Bubna <nat...@esha.com>
Subject Re: Paging database results
Date Wed, 04 Aug 2004 22:45:03 GMT
N Kaikis said:
> I'm a bit new to mailing lists and to Velocity,but I have a small
> problem.Basically,I'm trying to page some results(around 224) that come from
a
> table in my database.
...
> where all the variables appearing on the first line come from the
session.The
> $pageSize=30,so that each page contains 30 results and I'm querying the
> database each time to give me the next 30 results,by checking the startNo
> variable.
> My problem is,that,when I'm on the last page of my results,although there
are
> only 4 results remaining to display,Velocity displays 30 results with 26
> results being empty.
>
> I have searched the Internet a lot,but nothing helpful came up.Any kind of
help
> would be valuable    :)

check your logs.  i'd bet money that you'll find about 26 warnings that the
RHS of a #set() was null.  you see, Velocity won't let you #set() references
to null.  changing that or making that behavior configurable has been long
discussed and debated (check archives and bugzilla), but so far it hasn't
changed.

there are several strategies for dealing with this, but i gotta run right now.
if you can't figure it out on your own or someone else doesn't pipe up, give a
shout and i'll see if i can't help later.

Nathan Bubna
nathan@esha.com


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


Mime
View raw message