From: groditi Date: Wed, 2 Jan 2008 18:52:48 +0000 (+0000) Subject: trying to narrow it down X-Git-Tag: v0.002000~446^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3b02c20949cb0a23eaecb903ea450643cd95cabf;hp=c8fbb8ad6185f3f14717138aaf8bb95d6b2d27b2;p=catagits%2FReaction.git trying to narrow it down --- diff --git a/lib/Reaction/UI/ViewPort/Collection/Grid.pm b/lib/Reaction/UI/ViewPort/Collection/Grid.pm index bc81a0c..9d48cd1 100644 --- a/lib/Reaction/UI/ViewPort/Collection/Grid.pm +++ b/lib/Reaction/UI/ViewPort/Collection/Grid.pm @@ -35,8 +35,16 @@ class Grid is 'Reaction::UI::ViewPort::Collection', which { my %excluded = map { $_ => undef } @{ $self->excluded_fields }; #treat _$field_name as private and exclude fields with no reader my @names = grep { $_ !~ /^_/ && !exists($excluded{$_})} map { $_->name } - grep { defined $_->get_read_method } - $self->current_collection->member_type->meta->parameter_attributes; + grep { + !($_->has_type_constraint && + ($_->type_constraint->is_a_type_of('ArrayRef') || + eval {$_->type_constraint->name->isa('Reaction::InterfaceModel::Collection')} || + eval { $_->_isa_metadata->isa('Reaction::InterfaceModel::Collection') } + ) + ) } + grep { defined $_->get_read_method } + $self->current_collection->member_type->meta->parameter_attributes; + return $self->sort_by_spec($self->field_order, \@names); };