calling methods for each object in a list
Hi Zopistas. I have the following problem: I have a form that prints out a list with object-titles and a checkbox next to each of them. All this objects have the same method foo now I want my users to check that objects where the function foo shall be called with. So all checkboxes have the same name and I give a list of ids over: when I do a <dtml-in ids> <dtml-var sequence-item> </dtml-in> it prints out the ids of the checked objects fine, but when I try a <dtml-in ids> <dtml-call "sequence-item.foo"> </dtml-in> he doesn't know sequence-item anymore any ideas? TIA Philipp Dunkel Philipp Dunkel pgp and gnuPG public keys available ICQ# 60149094
Philipp Dunkel schrieb: [...]
when I do a
<dtml-in ids> <dtml-var sequence-item> </dtml-in>
it prints out the ids of the checked objects fine, but when I try a
<dtml-in ids> <dtml-call "sequence-item.foo"> </dtml-in>
he doesn't know sequence-item anymore
No, Zope can't, especially Python can't, because it trys to evaluate something like sequence - item.foo. So try <dtml-with sequence-item> <dtml-call "foo"> </dtml-with or: <dtml-call "_.['sequence-item'].foo"> hth, Thomas
participants (2)
-
Philipp Dunkel -
Thomas Weiner