[Zope] Accessing an object from a list
Alexandre Ratti
alex@gabuzomeu.net
Thu, 11 Nov 1999 23:50:24 +0100
Hello,
I ran into this problem once again: what is the best way to access an
object whose ID is stored in a list?
Here's my setup: I use a form with check boxes to select object IDs. The
values for the selected boxes are send to the handler method in a list
(myList). Here is the code in the handler method.
<dtml-with REQUEST>
...
<dtml-in myList>
<dtml-let foo="_['sequence-item']">
<dtml-with "_.getitem(foo, 0)">
<dtml-var myProp1> - <dtml-var myProp2>
</dtml-with>
</dtml-let>
</dtml-in>
...
</dtml-with>
I was lucky because this actually works. However, it looks kludgy. Is there
a better way? For instance, can I use the 'mapping' attribute in the with tag?
Thanks.
Alexandre