[Zope-dev] how to iterate on a list of DataSkins?
Jephte CLAIN
Jephte.Clain@univ-reunion.fr
Tue, 27 Jun 2000 19:42:58 +0400
hello,
I have a custom Rack which have a searchResults:
-----8<-----
def searchResults(self, **kw):
sqlresults = self.sql_search(kw)
return map(
lambda r, self=self: self.getItem(r.key),
sqlresults
)
-----8<-----
The sql query give me a list of keys to be looked up in the ZODB. I have
got an AttributeProvider on the rack which get the other attributes from
the SQL table.
However, when I try to use the results from DTML inside the specialist:
<dtml-in "searchResults()">
<dtml-var sqlvalue>
</dtml-in>
This does not work. It throws an exception (sqlvalue not found)
But:
<dtml-var "searchResults()[0].sqlvalue">
*does* work. Why the DataSkin seems no to be pushed on the variable
stack in the first case???
any ideas?
regards,
jephte clain
jclain@univ-reunion.fr