Skip Menu |

This queue is for tickets about the HTML-FormFu-Model-DBIC CPAN distribution.

Report information
The Basics
Id: 59563
Status: rejected
Priority: 0/
Queue: HTML-FormFu-Model-DBIC

People
Owner: Nobody in particular
Requestors: jorge.gonzalez [...] daikon.es
Cc:
AdminCc:

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



Subject: Foreign key label in has_one relationships (label_column)
When configuring has_one relationships in the form, one can currently select the column which will be used as a label in the Select widget (through the label_column attribute). This works fine when one single column describes the element for the relationship (i.e. a column named "NAME", "DESCRIPTION", or similar). When the entity is a person, though, it would be great that not one column but that the concatenation of several of them in some specific way could be used as the label; i.e. use "NAME || ' ' || FAMILY_NAME" as the label (SQL syntax). In this way, one would be able to select from a selection widget which has the complete name of the employee, and not only the first name. This could be implemented, for example, by allowing label_column to be a listref of columns which would be concatenated by default with a single space in between. Maybe a new option would be more convenient so as to not break compatibility. I have tried to do it by myself, but the changes involved seemed to be too intrusive initially. I'll explore new ways and attach a patch in case I get it. Thanks Jorge
Subject: Re: [rt.cpan.org #59563] Foreign key label in has_one relationships (label_column)
Date: Tue, 20 Jul 2010 06:47:00 -0700
To: bug-HTML-FormFu-Model-DBIC [...] rt.cpan.org
From: Andreas Marienborg <andreas.marienborg [...] gmail.com>
Could you not create a method on your row-object called full_name, and list that as label_column? On Jul 20, 2010, at 5:51 AM, Jorge Gonzalez via RT wrote: Show quoted text
> Tue Jul 20 08:51:05 2010: Request 59563 was acted upon. > Transaction: Ticket created by jorgegv > Queue: HTML-FormFu-Model-DBIC > Subject: Foreign key label in has_one relationships (label_column) > Broken in: 0.06000 > Severity: Wishlist > Owner: Nobody > Requestors: jorge.gonzalez@daikon.es > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=59563 > > > > When configuring has_one relationships in the form, one can currently > select the column which will be used as a label in the Select widget > (through the label_column attribute). This works fine when one single > column describes the element for the relationship (i.e. a column named > "NAME", "DESCRIPTION", or similar). > > When the entity is a person, though, it would be great that not one > column but that the concatenation of several of them in some specific > way could be used as the label; i.e. use "NAME || ' ' || FAMILY_NAME" as > the label (SQL syntax). > > In this way, one would be able to select from a selection widget which > has the complete name of the employee, and not only the first name. > > This could be implemented, for example, by allowing label_column to be a > listref of columns which would be concatenated by default with a single > space in between. Maybe a new option would be more convenient so as to > not break compatibility. > > I have tried to do it by myself, but the changes involved seemed to be > too intrusive initially. I'll explore new ways and attach a patch in > case I get it. > > Thanks > Jorge