View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Philip Crow > Bigtop > docs/keyword_cookbook/controller/controls_table/discussion


Annotate this POD


New  3
Open  1
View/Report Bugs


One of the most commonly used controller keywords, controls_table must be the name of a table block in the same bigtop file. This adds a use statement for the table's model and provides the link between controller methods and the underlying table. This affects things like column labels on main listings, HTML form input element labels, etc.


Build the example with:

    bigtop -c example.bigtop all

Look in lib/Kids/ to see

    use Kids::Model::child qw(

    sub get_model_name {
        return $CHILD;

The model use statement is repeated in lib/Kids/GEN/ from which Kids::Child inherits. To see side affects of controls_table, look in the generated do_main:

    my $retval = {
        headings       => [
            'Birth Day',

The Name and Birth Day labels were taken from the label statements of fields blocks in the childtable, because they were listed in the cols statement.

Other similar magic happens because of controls_table.

syntax highlighting: