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

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to