diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-30 22:20:28 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-30 22:20:28 +0000 |
commit | 95d600f52e55c4eda7926d49bd62461571f6f86c (patch) | |
tree | 7000370fda8406b567d92e72a7ccc4802f5e681a | |
parent | 11c5dd88e25688d4520f7e82e945427d9542c09f (diff) | |
download | reaction-95d600f52e55c4eda7926d49bd62461571f6f86c.tar.gz reaction-95d600f52e55c4eda7926d49bd62461571f6f86c.zip |
ChooseMany fix
-rw-r--r-- | lib/Reaction/UI/ViewPort/Field/Mutable/ChooseMany.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseMany.pm b/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseMany.pm index f799160..b3dca44 100644 --- a/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseMany.pm +++ b/lib/Reaction/UI/ViewPort/Field/Mutable/ChooseMany.pm @@ -28,14 +28,16 @@ class ChooseMany is 'Reaction::UI::ViewPort::Field', which { $orig->($self, $checked); }; + around _value_string_from_value => sub { + my $orig = shift; my $self = shift; - join ", ", (map {$self->obj_to_name($_->{value}) } @{ $self->current_value_choices }) + join(", ", (map {$self->obj_to_name($_->{value}) } @{ $self->current_value_choices })); }; implements is_current_value => as { my ($self, $check_value) = @_; - return $self->_model_has_value; + return unless $self->_model_has_value; my @our_values = @{$self->value || []}; $check_value = $self->obj_to_str($check_value) if ref($check_value); return grep { $self->obj_to_str($_) eq $check_value } @our_values; |