use Reaction::UI::WidgetClass;
class ActionForm, which {
- widget renders [qw/header fields buttons footer/
- => { viewport => func('self','viewport') } ];
+ fragment widget [ qw/header field_list buttons footer/ ];
- fields renders [viewport over func('viewport','ordered_fields')];
+ fragment field_list [field => over func('viewport','ordered_fields')];
+ fragment field [ 'viewport' ];
- buttons renders [ string {"DUMMY"} ], {message => func('viewport','message');
- header renders [ string {"DUMMY"} ];
- footer renders [ string {"DUMMY"} ];
+ #move button logic here
+ fragment buttons [ string {"DUMMY"} ],
+ {message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" } };
+ fragment header [ string {"DUMMY"} ];
+ fragment footer [ string {"DUMMY"} ];
};
__END__;
-
=head1 NAME
Reaction::UI::Widget::ActionForm
Additional variables available in topic hash: "viewport".
-Renders "header", "fields", "buttons" and "footer"
+Renders "header", "field_list", "buttons" and "footer"
-=head2 fields
+=head2 field_list
Sequentially renders the C<ordered_fields> of the viewport