[Zope] forcing acquired DTML to act as if not acquired
Rik Hoekstra
rik.hoekstra@inghist.nl
Thu, 27 Apr 2000 21:45:46 +0200
-----Original Message-----
From: Karl Anderson <karl@digicool.com>
To: Rik Hoekstra <rik.hoekstra@inghist.nl>
Cc: zope@zope.org <zope@zope.org>; Karl Anderson <kra@monkey.org>
Date: donderdag 27 april 2000 21:09
Subject: Re: [Zope] forcing acquired DTML to act as if not acquired
>"Rik Hoekstra" <rik.hoekstra@inghist.nl> writes:
>
>> From: Karl Anderson <kra@monkey.org>
>> [acquired DTML document acts on source location, not acquired
>> location]
>
>> ><dtml-tree expr="PARENTS[0]" branches=objectValues>
>> > <a href="<dtml-var tree-item-url>/addFolderForm">addFolder</a><br>
>> ></dtml-tree>
>>
>> Hm, have you tried using a DTML Method for addFolderForm? This looks like
>> the problem of trying to add a folder to a DTML Document. This doesn't
work
>> and it adds the added object to the acquisition root. As you describe it
>> (you actually do end up in the addFolderForm in the right destination?),
>> this sounds as if it should work.
>
>Yep, changing the action that addFolderForm invokes to a DTML method,
>not a DTML document, does the trick. Thanks.
>
>But is this really because it was trying to add a folder to a DTML
>document? tree-item-url was always a folder, and it doesn't matter
>that addFolderForm is still a DTML document, just the action of that
>form.
>
>A DTML document is it's own self, while a DTML method is a method of
>its container, but I don't see why it would work at the acquisition
>source if it doesn't elsewhere.
>
Still, being an object of it's own, it is pushed on top of the namespace
stack, so it is the first object the called method tries to add the folder
to. It might work if you put in a PARENTS[0].
By the way, it doesn't work at the acquisition source: instead of placing
the added object in the DTML Document it puts it in the acquisition root,
because it can't put it in the the DTML Document itself . It will do the
same anywhere in the acquisition path. Why this is so - I wouldn't know.
It's probably just the way acquisition is designed ;-)
Rik