# Copyright (c) 2006 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: ListFormModel.bunit,v 1.4 2008/01/08 19:09:25 nagler Exp $ options({ class_name => 'Bivio::Biz::t::ListFormModel::T1ListForm', }); req()->initialize_fully(); model('NumberedList')->load_page({count=> 3}); [ [req()] => [ get_fields_for_primary_keys => [ [] => [{ index_0 => 0, index_1 => 1, index_2 => 2, }], ], get_field_name_in_list => [ index => DIE(), 'RealmOwner.name' => 'RealmOwner.name', ], set_cursor => [ 0 => not_die(), ], get_field_name_in_list => [ index => 'index_0', ], process => not_die(), map_rows => sub { my($case, $actual) = @_; expect_contains( [map(+{"form_index_$_" => $_}, 0..2)], $actual->[0], ); return 1; }, ], ];