Maypole::Plugin::ColumnGroups

Set up column groups in Maypole
Download

Maypole::Plugin::ColumnGroups Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • David R. Baird
  • Publisher web site:
  • http://search.cpan.org/~davebaird/

Maypole::Plugin::ColumnGroups Tags


Maypole::Plugin::ColumnGroups Description

Set up column groups in Maypole Maypole::Plugin::ColumnGroups is a Perl module to setup column groups in Maypole.SYNOPSIS use Maypole::Application qw( ColumnGroups -Debug2 ); # Maypole will use the column 'name' or 'title', if it exists, or a primary # key column that is not called 'id'. Otherwise, you need to tell Maypole # what column to stringify objects to: __PACKAGE__->config->column_groups( { person => { Stringify => 'first_name' }, car => { Stringify => 'model' }, widget => { Stringify => 'part_no' }, article => { Editor => , Writer => , Reviewer => , }, finance => { Editor => }, } ); # # An example using Maypole::Plugin::Config::Apache: # PerlAddVar MaypoleColumnGroups "person => { Stringify => 'first_name' }" PerlAddVar MaypoleColumnGroups "car => { Stringify => 'model' }" PerlAddVar MaypoleColumnGroups "widget => { Stringify => 'part_no' }" PerlAddVar MaypoleColumnGroups "article => { Editor => }" PerlAddVar MaypoleColumnGroups "article => { Writer => }" PerlAddVar MaypoleColumnGroups "article => { Reviewer => }" PerlAddVar MaypoleColumnGroups "finance => { Editor => }"Maypole use the Stringify column group to decide which column to use when, for example, displaying a link to an object. If there is no Stringify group, Maypole defaults to using the column 'name' or 'title', if it exists, or a primary key column that is not called 'id'. Otherwise, you need to tell Maypole what column to stringify objects on.Authorization could make heavy use of column groups to decide who has access to what columns of different tables. It's easy enough to set up column groups by hand, but it's also useful to be able to stuff all that information into the configuration data.Maypole::FormBuilder defines several pairs of *_columns and *_fields accessors in the model class, generally one pair for each main template (view, edit, addnew etc.). You could override these methods to look up their lists in the column_groups and field_groups config slots.Setting the Debug flag to 2 or higher will print some info to STDERR to confirm how the groups have been set up. Requirements: · Perl


Maypole::Plugin::ColumnGroups Related Software