aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Reaction/UI/Widget/GridView.pm
blob: bb7494c3166fbe999b400e23e6e4ca6fbb04b419 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package Reaction::UI::Widget::GridView;

use Reaction::UI::WidgetClass;

class GridView, which {
  widget renders [ qw/header body footer/
                   => { viewport => func('self', 'viewport') }
                 ];

  header      renders [ 'header_row' ];
  header_row  renders [ header_cell over func('viewport', 'column_names') ];
  header_cell renders [ string { $_ } ];

  footer      renders [ 'footer_row' ];
  footer_row  renders [ footer_cell over func('viewport', 'column_names') ];
  footer_cell renders [ string { $_ } ];


  body      renders [ body_row over func('viewport','rows')];
  body_row  renders [ body_cell over $_ ]; #over $_ ? heeelp
  body_cell renders [ 'viewport' ];

};

1;