++ed by:
JROBINSON AWNCORP POTATOGIM ROMANF AERO

11 PAUSE users
15 non-PAUSE users.

Henry Van Styn
and 12 contributors

NAME

RapidApp::Module::DbicRowDV - DataView module for a single DBIC Row

SYNOPSIS

In the RapidDbic config of a DBIC module:

  # ...
  RapidDbic => {
    grid_params => {
      '*defaults' => { # Defaults for all Sources
        updatable_colspec => ['*'],
        creatable_colspec => ['*'],
        destroyable_relspec => ['*']
      }, # ('*defaults')
      SomeSource => {
        page_class  => 'RapidApp::Module::DbicRowDV',
        page_params => {
          template => 'somesource.html',
        }
      }
      # ...
  
    },
    # ...
  }
  # ...
 

In somesource.html:

  <div>
  <b>Name:</b> [% r.autofield.column1 %]
  </div>

  <div>
  [% r.autofield.column2 %]
  </div>
  
  {column3}
  
  # ...

DESCRIPTION

This module provides a TT-driven html template for the "page" view of a DBIC source. It extends the RapidApp::Module::AppDV class, targeted for this specific (i.e. single row) case. If you want a custom designed page for a row, with in-line editable columns, this is the module you want.

ATTRIBUTES

This module supports all the same attributes of DbicLnk module (i.e. include_colspec, ResultSource, etc) plus the following extra attrs.

tt_include_path

Defaults to root/templates within your application home dir.

template

Path to the template to use under the tt_include_path

The template can contain raw html. The read-only value of a given column can used inline by supplying the column name within curly-braces:

  {some_column}

For an editable version of a column (dependent on editable perms, updatable_colspec, etc) use:

  [% r.autofield.some_column %]

This will also render the value of the column, but will also be an editable/clickable control to set the value in-place.

SEE ALSO

AUTHOR

Henry Van Styn <vanstyn@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by IntelliTree Solutions llc.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.