Re: inflating columns to objects

[prev] [thread] [next] [Date index for 2004/10/27]

From: Dave Howorth
Subject: Re: inflating columns to objects
Date: 14:33 on 27 Oct 2004
Drew Taylor wrote:
> Ahhh... stringification. By default CDBI uses the primary key(s) when
> stringified, but that is configurable.
> 
> # the easy way
> Widget->columns(Stringify => qw/your_col/);
> 
> # the more powerful way
> sub stringify_self {
>   my $self = shift;
>   return join ":", $self->id, $self->name;
> }

Well this is how to set up how a table reference is presented, and I do 
use that where appropriate, but that's not what we're talking about. The 
problem is getting my desired representation of a particular column on a 
particular page.

To do get a particular representation of a column, I've overloaded the 
stringification operator with a method of your choice (display, in my 
case). See the code I posted for how to do it. That works on Maypole's 
list page but doesn't work when processed by AsForm for Maypole's edit page.

Cheers, Dave

(message missing)

inflating columns to objects
Dave Howorth 16:23 on 26 Oct 2004

Re: inflating columns to objects
Drew Taylor 16:30 on 26 Oct 2004

Re: inflating columns to objects
Dave Howorth 16:41 on 26 Oct 2004

Re: inflating columns to objects
Drew Taylor 17:40 on 26 Oct 2004

Re: inflating columns to objects
Dave Howorth 13:24 on 27 Oct 2004

Re: inflating columns to objects
Drew Taylor 14:13 on 27 Oct 2004

Re: inflating columns to objects
Dave Howorth 14:33 on 27 Oct 2004

Re: inflating columns to objects
Drew Taylor 14:37 on 27 Oct 2004

Re: inflating columns to objects
Dave Howorth 16:17 on 27 Oct 2004

Generated at 11:34 on 01 Dec 2004 by mariachi v0.52