[Maypole] extending edit template for beerdb?
Carsten Øland Madsen
com@navicon.dk
Tue, 08 Jun 2004 12:18:44 +0200
Hi
I'm trying to extend the edit template for the BeerDB demo so that when
editing beers a list of pubs will be availabe and it will be possible to
add and remove pubs.
Currently I'm struggling with getting a list with all the pubs from
within the edit template.
My template code looks like this
FOR accessor = classmetadata.related_accessors.list;
"<p><select name=\""; accessor | ucfirst; "\" multiple size=4>\n";
# if stuff missing here with accessor
FOR thing = config.loader.find_class('pub').retrieve_all();
"<option value="; thing.id; ">"; thing.name; "</option>\n";
END;
"</select></p>";
END;
Why does the
config.loader.find_class('pub').retrieve_all();
call not return a list with all the pubs?
The find_class returns 'BeerDB::Pub'.
rgds
/carsten