[jifty-devel] Default view and create/update versions of Select widget not consistent

Jesse Vincent jesse at bestpractical.com
Mon May 15 08:28:07 EDT 2006

Thanks! Applied. 

On Mon, May 15, 2006 at 02:43:30AM +0200, Frederic BLANC wrote:
>  Hello,
>  My app uses some columns that refers_to other table, and I find that
> the default rendering of such column is inconsistent between update/create
> modes and the read one:
>  the update/create versions use a select field that displays values of
> the name column of the target table (of the name method if exists, the id
> otherwise) whereas the "view" version uses the default render_value method
> of Field.pm, and thus displays the id of the target row (which is not
> the expected result IMHO.)
>  In attachment is a patch that adds a render_value method to the Select widget
> to display the name (when it exists) instead of the id of the target row.
>  The second attachment is a patch for the Checkbox widget as I think 
> a checbox checked accordingly the current_value is nicer than the raw value.
>  The third attachment is for the Password widget which has already 
> a render_value method but which returns '-' only, without rendering any HTML.
>  The patch modify this behaviour by rendering the instead of returning it.
>  Regards,
>  Frederic BLANC

More information about the jifty-devel mailing list