[ZOPE] Copy from different levels at the same time?

c.koll@web.de c.koll@web.de
Wed, 13 Feb 2002 15:55:22 +0100


Hi there

I guess my problem had come up before, but I couldn=B4t find it in the archi=
ve.

1) I=B4ve got a folder hierarchy:
A
  B
    C

2) I use an external method to go through the hierarchy and display it in =
a way
similar to the ZMI (manage=5Fworkspace):
<form>
[]A
[]  B
[]    C

[copy] [rename] [...]
</form>

3) If selected, the id of each folder is stored in "ids" which is a list
(like it is in manage=5Fworkspace):
[X]A
[ ]  B
[X]    C
-> ids['A','C']

4) Now I want to copy the folders I selected somewhere else. So I send ids=

towards a DTML Method called "action" which is placed above the hierarchy.=


I tried to do <dtml-call "REQUEST.set('clipboard',manage=5FcopyObjects(ids))=
">
but I got some errors.

I guess the point is the "self" in manage=5FcopyObjects(self,...,), isn=B4t it=
=3F

I tried to simply select "A" and moreover I added

<dtml-with parent=5Ffolder=5Fof=5FA>
  ...manage=5FcopyObjects(ids)
</dtml-with>

in my "action" method.=20
It worked!
So I concluded that I need to get the context of every object in ids.
The problem is that the objects are placed in different levels of the hier=
archy.=20
To solve this problem I thought of something like:
**** PSEUDO-CODE *********
Script:
for object in ids: getParent(object)/getContext(object)

or in dtml:
<dtml-in ids>
<dtml-with sequence-item(PARENTS[1])
</dtml-with>
</dtml-in>
**************************

I don=B4t exactly know how to do that.
Any suggestions=3F
=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=
=5F=5F=5F=5F
All inclusive! 100 MB Speicher, 1000 Mails, Wunschrufnummer, Superstars,
Events, Preisvorteile und mehr unter http://club.web.de/=3Fmc=3D021104