diff options
author | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-02 18:49:19 +0000 |
---|---|---|
committer | groditi <groditi@03d0b0b2-0e1a-0410-a411-fdb2f4bd65d7> | 2008-01-02 18:49:19 +0000 |
commit | c8fbb8ad6185f3f14717138aaf8bb95d6b2d27b2 (patch) | |
tree | 03f004e2e8b59e5b809444d323c48b4b9c7221fd /lib/Reaction/UI/ViewPort/Collection | |
parent | 2f670e13aa8f30bbf6ba910f2d8ef97aa8a9e3e5 (diff) | |
download | reaction-c8fbb8ad6185f3f14717138aaf8bb95d6b2d27b2.tar.gz reaction-c8fbb8ad6185f3f14717138aaf8bb95d6b2d27b2.zip |
work in progress, listview still broken
Diffstat (limited to 'lib/Reaction/UI/ViewPort/Collection')
-rw-r--r-- | lib/Reaction/UI/ViewPort/Collection/Grid.pm | 5 | ||||
-rw-r--r-- | lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/Reaction/UI/ViewPort/Collection/Grid.pm b/lib/Reaction/UI/ViewPort/Collection/Grid.pm index 3314039..bc81a0c 100644 --- a/lib/Reaction/UI/ViewPort/Collection/Grid.pm +++ b/lib/Reaction/UI/ViewPort/Collection/Grid.pm @@ -25,13 +25,16 @@ class Grid is 'Reaction::UI::ViewPort::Collection', which { return \%labels; }; + implements _build_field_order => as { []; }; + implements _build_excluded_fields => as { []; }; + implements _build_ordered_fields => as { my ($self) = @_; confess("current_collection lacks a value for 'member_type' attribute") unless $self->current_collection->has_member_type; my %excluded = map { $_ => undef } @{ $self->excluded_fields }; #treat _$field_name as private and exclude fields with no reader - my @names = grep { $_ !~ /^_/ && !exists($exclude{$_})} map { $_->name } + my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name } grep { defined $_->get_read_method } $self->current_collection->member_type->meta->parameter_attributes; return $self->sort_by_spec($self->field_order, \@names); diff --git a/lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm b/lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm index 0aa5e1d..c37e10e 100644 --- a/lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm +++ b/lib/Reaction/UI/ViewPort/Collection/Grid/Member.pm @@ -2,7 +2,7 @@ package Reaction::UI::ViewPort::Collection::Grid::Member; use Reaction::Class; -Class Member is 'Reaction::UI::ViewPort::Object', which { +class Member is 'Reaction::UI::ViewPort::Object', which { around _build_fields_for_type_Num => sub { $_[0]->(@_[1..3], { layout => 'value/number', %{ $_[4] } }) @@ -41,3 +41,5 @@ Class Member is 'Reaction::UI::ViewPort::Object', which { around _build_fields_for_type_Reaction_InterfaceModel_Collection => sub { return }; }; + +1; |