[cgiapp] Q: Any guidelines for paging thru db records via CGI params?

Michael Lackhoff lackhoff at zbmed.uni-koeln.de
Mon May 26 09:56:52 EDT 2008


On 26 May 2008 at 23:13, Cees Hek wrote:

Many thanks Cees, I think that should get me going. The only missing 
part is -- well, the plugin. Or did I miss something? At least I didn't 
see an attachment or link.

> So from the template above you can see that the pager object has at
> least the following methods:

what do you mean by "at least"? Because it is work in progress or is 
there some modular system within your plugin?

> page
> last_page
> next_page
> previous_page
> on_first_page
> on_last_page
> url
> formurl
> hidden_params
> 
> Most of those are self explanatory.  The url method is (IMHO) the best
> part, since you don't have to worry about building URLs yourself.  It

I already have a url method in my base class. I use it to build a URL 
that is both pretty and what CAP::Dispatch expects, e.g. I feed 
(customers, edit, 342) to it and get 
'http://myserver/customers/edit/342' back (looks trivial but also 
handles lots of variants). I am not sure yet how to best avoid a naming 
conflict but there will be ways.

-Michael
-- 
Michael Lackhoff
ZB MED Medizin. Gesundheit. / EDV-Abteilung
Fon: + 49 (0) 221 478-7105
Michael.Lackhoff at zbmed.de



More information about the cgiapp mailing list