use Reaction::UI::WidgetClass;
class ActionForm, which {
- fragment widget [ qw/header field_list buttons footer/ ];
- widget renders [ qw/header fields buttons footer/ ],
- {id => sub { $_{viewport}->location } };
++ fragment widget [ qw/header field_list buttons footer/ ]
++ => {id => sub { $_{viewport}->location } };
- fields renders [field over func('viewport','ordered_fields')];
- field renders [ 'viewport' ];
+ fragment field_list [field => over func('viewport','ordered_fields')];
+ fragment field [ 'viewport' ];
#move button logic here
- buttons renders [ string {"DUMMY"} ],
+ fragment buttons [ string {"DUMMY"} ],
- {message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" } };
+ { message => sub{ $_{viewport}->can('message') ? $_{viewport}->message : "" },
+ ok_label => func(viewport => 'ok_label'),
+ close_label => func(viewport => 'close_label'),
+ apply_label => func(viewport => 'apply_label'),
+ };
+
- header renders [ string {"DUMMY"} ];
- footer renders [ string {"DUMMY"} ];
+ fragment header [ string {"DUMMY"} ];
+ fragment footer [ string {"DUMMY"} ];
};
has id => (isa => 'Str', is => 'ro', lazy_build => 1);
has name => (isa => 'Str', is => 'ro', lazy_build => 1);
- implements build_id => as { shift->viewport->event_id_for('value'); };
- implements build_name => as { shift->viewport->event_id_for('value'); };
+ implements _build_id => as { shift->viewport->event_id_for('value'); };
+ implements _build_name => as { shift->viewport->event_id_for('value'); };
- widget renders [qw/label field message/
+ fragment widget [qw/label field message/
=> { id => func('self', 'id'),
name => func('self', 'name'), }
];