Chisel Wright wrote:
On Mon, Feb 11, 2008 at 12:55:55PM +0300, Alex Povolotsky wrote:
Hello!

I haven't find the answer in FAQ and cookbook, so I'm asking here.

How do I add server-side sorting for list operation? I want to select * from table sort by field instead of default select * from table

I think you are looking for 'order_by' in perldoc DBIx::Class::ResultSet

Looking at Catalyst::Enzyme::CRUD::Controller


sub list : Local {
   my ( $self, $c ) = @_;
my $model = $self->model_with_pager($c, $self->crud_config->{rows_per_page}, $c->req->param("page"))
;
   $c->stash->{items} = [ $model->retrieve_all() ];
   $c->stash->{template} = 'list.tt';
}

what should I change?

Alex.


_______________________________________________
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