Skip Menu |

This queue is for tickets about the Rose-DBx-Garden-Catalyst CPAN distribution.

Report information
The Basics
Id: 59177
Status: resolved
Priority: 0/
Queue: Rose-DBx-Garden-Catalyst

People
Owner: Nobody in particular
Requestors: rezny [...] cs.wisc.edu
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Livegrid columns in seemingly random order
Date: Wed, 07 Jul 2010 17:50:28 -0500
To: bug-rose-dbx-garden-catalyst [...] rt.cpan.org
From: Elliott Rezny <rezny [...] cs.wisc.edu>
I don't have enough test-cases to tell what the method of order is, but I'm having trouble getting the livegrid to keep the columns in a reasonable order rather than expect the user to reorder the columns or put up with a sub-par view. This may be an underlying issue in CatalystX::CRUD::YUI::LiveGrid, but I'm hoping I am just missing the official way of ordering the columns. I have the rank and tabindex set cor each column in the form.pm, and while the view and edit pages respect them, the livegrid does not.
Subject: Re: [rt.cpan.org #59177] Livegrid columns in seemingly random order
Date: Thu, 08 Jul 2010 13:29:35 -0500
To: bug-Rose-DBx-Garden-Catalyst [...] rt.cpan.org
From: Peter Karman <peter [...] peknet.com>
Elliott Rezny via RT wrote on 07/07/2010 05:50 PM: Show quoted text
> Wed Jul 07 18:50:43 2010: Request 59177 was acted upon. > Transaction: Ticket created by rezny@cs.wisc.edu > Queue: Rose-DBx-Garden-Catalyst > Subject: Livegrid columns in seemingly random order > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: rezny@cs.wisc.edu > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59177 > > > > I don't have enough test-cases to tell what the method of order is, but > I'm having trouble getting the livegrid to keep the columns in a > reasonable order rather than expect the user to reorder the columns or > put up with a sub-par view. This may be an underlying issue in > CatalystX::CRUD::YUI::LiveGrid, but I'm hoping I am just missing the > official way of ordering the columns. I have the rank and tabindex set > cor each column in the form.pm, and while the view and edit pages > respect them, the livegrid does not. >
You can declare the livegrid column order in the RHTMLO::Form subclass, using the 'field_methods' and 'default_sort_by' params. There's not very good documentation on this; patches appreciated. Here's what my class looks like: package MyApp::RDBO::Foo::Form; use strict; sub init_metadata { my $self = shift; return $self->metadata_class->new( form => $self, controller_prefix => 'RDGC', labels => { foo => 'A Label by any other Name', bar => 'The Path to Enlightenment', color => 'The Color', # not shown in livegrid }, default_sort_by => 'foo', field_methods => [qw( foo bar )], # NOTE color not here ); } -- Peter Karman . http://peknet.com/ . peter@peknet.com
Subject: Re: [rt.cpan.org #59177] Livegrid columns in seemingly random order
Date: Thu, 08 Jul 2010 14:38:15 -0500
To: bug-Rose-DBx-Garden-Catalyst [...] rt.cpan.org
From: Elliott Rezny <rezny [...] cs.wisc.edu>
On 07/08/2010 01:29 PM, peter@peknet.com via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=59177> > > Elliott Rezny via RT wrote on 07/07/2010 05:50 PM:
>> Wed Jul 07 18:50:43 2010: Request 59177 was acted upon. >> Transaction: Ticket created by rezny@cs.wisc.edu >> Queue: Rose-DBx-Garden-Catalyst >> Subject: Livegrid columns in seemingly random order >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: rezny@cs.wisc.edu >> Status: new >> Ticket<URL: https://rt.cpan.org/Ticket/Display.html?id=59177> >> >> >> I don't have enough test-cases to tell what the method of order is, but >> I'm having trouble getting the livegrid to keep the columns in a >> reasonable order rather than expect the user to reorder the columns or >> put up with a sub-par view. This may be an underlying issue in >> CatalystX::CRUD::YUI::LiveGrid, but I'm hoping I am just missing the >> official way of ordering the columns. I have the rank and tabindex set >> cor each column in the form.pm, and while the view and edit pages >> respect them, the livegrid does not. >>
> > You can declare the livegrid column order in the RHTMLO::Form subclass, > using the 'field_methods' and 'default_sort_by' params. There's not very > good documentation on this; patches appreciated. > > Here's what my class looks like: > > package MyApp::RDBO::Foo::Form; > use strict; > > sub init_metadata { > my $self = shift; > > return $self->metadata_class->new( > > > form => $self, > > > controller_prefix => 'RDGC', > > labels => { > > > foo => 'A Label by any other Name', > bar => 'The Path to Enlightenment', > color => 'The Color', # not shown in livegrid > > > }, > default_sort_by => 'foo', > field_methods => [qw( foo bar )], # NOTE color not here > ); > > } >
Thank You, That code snippet is exactly the kind of example I was looking for. I will contribute patches in the future where I can.