extends 'Reaction::UI::ViewPort::Object::Mutable';
with 'Reaction::UI::ViewPort::Action::Role::OK';
-sub DEBUG_EVENTS () { $ENV{REACTION_UI_VIEWPORT_DEBUG_EVENTS} }
-
has message => (is => 'rw', isa => Str);
has '+model' => (handles => [qw/error_message has_error_message/]);
}
}
-after handle_events => sub {
- my ($self, $events) = @_;
- foreach my $event ($self->accept_events) {
- unless (exists $events->{$event} ) {
- # for <input type="image"... buttons
- if ( exists $events->{"${event}.x"} && exists $events->{"${event}.y"} ) {
- $self->_dump_event($event, $events->{$event}) if DEBUG_EVENTS;
- $self->$event($events->{$event});
- }
- }
- }
-};
-
__PACKAGE__->meta->make_immutable;
1;
foreach my $type (qw/query body/) {
my $meth = "${type}_parameters";
- my $param_hash = { %{$ctx->req->$meth} }; # yeah, FocusStack deletes it
+ my $req_param = $ctx->req->$meth;
+ my $param_hash = {
+ map {
+ $_ =~ m/(^r.+\:\w+)\.(x|y)/ ? # for <input type="image"... buttons
+ ( $1 => $req_param->{$_} )
+ : ( $_ => $req_param->{$_} )
+ } keys %$req_param
+ }; # yeah, FocusStack deletes it
my @param_keys = keys %$param_hash;
if (@param_keys) {
for (@param_keys) {