[Zope] Why is the context different for these two methods?
Jonathan Hobbs
toolkit at magma.ca
Fri Jul 16 13:44:00 EDT 2004
From: "Gary Duke Speer" <zope at cortech.org>
> A DTML Method with <dtml-in "objectValues('Folder')">
> returns the sub-folders of it's container folder.
>
> in the same context,
> A DTML Method with <dtml-in "objectIds('Folder')">
> returns the sub-folders of it's container folder's parent folder.
> why should objectIds look to the grandparent folder?
>
> Because these are in a DTML Method, I would expect both to exaluate in the
> context of the containing folder. Is objectIds somehow calling it's
> container folders' aq_parent namespace?
> This would seem to violate the "containment before context" paradigm.
The following two dtml loops both print out the same folder list for me (ie.
they both print out a list of folders contained within the current folder):
<dtml-in "objectValues('Folder')">
<dtml-var id><br>
</dtml-in>
<dtml-in "objectIds('Folder')">
<dtml-var sequence-item><br>
</dtml-in>
zope 2.6.4
Jonathan
More information about the Zope
mailing list