1 package Reaction::UI::ViewPort::Role::Actions;
4 use Reaction::UI::ViewPort::Action::Link;
6 use namespace::clean -except => [ qw(meta) ];
9 has actions => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
10 has action_prototypes => (is => 'ro', isa => 'ArrayRef', lazy_build => 1);
11 sub _build_action_prototypes { [] };
16 my $loc = $self->location;
17 foreach my $proto (@{ $self->action_prototypes }) {
18 my $action = Reaction::UI::ViewPort::Action::Link->new
21 target => $self->model,
22 location => join ('-', $loc, 'action', $i++),
38 Reaction::UI::ViewPort::Role::Actions
42 A role to ease attaching actions to L<Reaction::InterfaceModel::Object>s
48 =head2 action_prototypes
52 See L<Reaction::Class> for authors.
56 See L<Reaction::Class> for the license.