diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-02 22:57:32 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-02 22:57:32 +0000 |
commit | 36d54b146cfba17f5c7757eced453429ee31c780 (patch) | |
tree | b6b64cdf2c279bc7337c3dad7043f43e57e64de2 /lib/Reaction/UI/ViewPort/Action.pm | |
parent | c03f75a7322e8194591d2f8bd02fb3f83df8833f (diff) | |
download | reaction-36d54b146cfba17f5c7757eced453429ee31c780.tar.gz reaction-36d54b146cfba17f5c7757eced453429ee31c780.zip |
choosemany is still broken (not applying changes) but everything else is looking better
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Action.pm')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Action.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Reaction/UI/ViewPort/Action.pm b/lib/Reaction/UI/ViewPort/Action.pm index 9da7191..c382bdb 100644 --- a/lib/Reaction/UI/ViewPort/Action.pm +++ b/lib/Reaction/UI/ViewPort/Action.pm @@ -37,13 +37,13 @@ class Action is 'Reaction::UI::ViewPort::Object', which { }; implements _build_ok_label => as{ 'ok' }; - implements _build_apply_label_ => as{ 'apply' }; + implements _build_apply_label => as{ 'apply' }; implements _build_close_label_close => as{ 'close' }; implements _build_close_label_cancel => as{ 'cancel' }; implements can_apply => as { my ($self) = @_; - foreach my $field ( @{ $self->ordered_fields } ) { + foreach my $field ( @{ $self->fields } ) { return 0 if $field->needs_sync; # if e.g. a datetime field has an invalid value that can't be re-assembled # into a datetime object, the action may be in a consistent state but @@ -96,11 +96,11 @@ class Action is 'Reaction::UI::ViewPort::Object', which { implements sync_action_from_fields => as { my ($self) = @_; - foreach my $field ($self->fields) { + foreach my $field (@{$self->fields}) { $field->sync_to_action; # get the field to populate the $action if possible } - $self->action->sync_all; - foreach my $field ($self->fields) { + $self->model->sync_all; + foreach my $field (@{$self->fields}) { $field->sync_from_action; # get errors from $action if applicable } }; |