[Catalyst] paging with Data::Page
Anne Wainwright
anotheranne at fables.co.za
Mon Jul 27 18:33:06 GMT 2009
Ian, hi.
Thanks so much for the suggestion, see comment below.
On Mon, 27 Jul 2009 14:42:25 +0100
Ian Sillitoe <ian at sillit.com> wrote:
> Thanks for advice, not always too keen to offload total problems for
> > free code input, but in this instance after lots of hours spent ...
> >
>
> Quickest way to get the problem fixed.
>
> I haven't got time to test the following just now, but my guess is
> that it is how you are assigning the result:
>
> - $c->stash(result => $result); # put data into stash
>
> try changing that to:
>
> + $c->stash->{result} = $result; # put data into stash
>
> Could be wrong, but I think the former is causing the resultset to be
> evaluated as an array and is therefore returning all the entries
> before the pager is being applied.
Sad to say this has not cleared the issue (am sure have been this route
before) and though we still get '1 - 10 of 13 entries' all 13 are on the
one page still.
Noting the following, I agree that the 'pager' code is probably correct
and the 'result' code seems to be the gremlin. How they interact is
beyond me
1 The de-Bindlexed 'pager' code definitely pages the entries into sets
of 10 with the original Bindlex 'result' code.
2 But the de-Bindlexed 'result' code is not paged into sets of 10 with
the original Bindlex 'pager' code with either your line or mine
does anyone else have a suggestion?
I note that Bindlex used to bring up a warning when the catalyst
development server was started, but I do not see this now. Has Bindlex
perhaps been un-deprecated? - in which case I can save all this effort
and continue using it!
>
> Cheers,
>
> Ian
More information about the Catalyst
mailing list