[Catalyst] Paging problem
Kenneth S Mclane
ksmclane at us.ibm.com
Fri Apr 27 19:22:36 GMT 2012
ok, I used bits from all over and have this sub now:
sub list :Local {
my ($self, $c) = @_;
my $page = 1;
my $rs = $c->model('ORANGES::AccountView')->search_rs(undef, {
order_by => 'account_code',
rows => 15,
page => $page,
});
$c->stash(accounts => $rs);
$c->stash(pager => $rs->pager());
}
This gets my data, in the order I want, gives me 15 rows and I found some
pager template code on-line which shows that it is doing it's job,
however, when clicking any link the data doesn't change.
I tried changing
$c->stash(pager => $rs->pager());
to $c->stash(pager => $accounts->pager());
but get an error about a non paged resultset. I have been searching for a
couple of hours and cannot find any examples using the stash that I can
get to work. I'm really close I know. I think it's another one of those
cases where I am not sure of the exact way to type it in.
Regards
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20120427/1f112eb0/attachment.htm
More information about the Catalyst
mailing list