[Zope] Need large Zen for manage_clone and getitem...
Heiko Stoermer
heiko@mig.net
Wed, 25 Aug 1999 22:09:01 +0200
Rik Hoekstra wrote:
> Date sent: Wed, 25 Aug 1999 18:16:54 +0200
> From: Heiko Stoermer <heiko@mig.net>
> To: Zope Mailing List <zope@zope.org>
> Subject: [Zope] another problem with manage_clone
>
> > hi
> > I already posted this on monday, but I really don't have a solution yet,
> > so please be patient...
> > The situation is nearly the same as in the CMG(Chapter "Creating a
> > Configuration Interface"), except for the fact that the document to be
> > cloned is not in the current namespace but in some other folder in the
> > zope tree:
> > I want to manage_clone an object into the current folder that lives
> > _somewhere_, let's say in "foo":
> >
> > /_root
> > |_foo
> > | |_Object
> > |
> > |_bar
> > |_current_folder
> >
> > there are two DTML-Documents a and b where a is an input form that
> > contains a list of all objects in foo.
> > a calls b.
> > b is supposed to do the following:
> > <!--#call "manage_clone(foo.Object,'new_html',REQUEST)"-->
>
> try something like
>
> <!--#call "manage_clone(_.getitem(foo,Object),'new_html', REQUEST)" --
> >
>
> where Object is the value from the form.
o.k., the form field is named "input", so I tried:
..._clone(_.getitem(foo.input),...) => Attribute error, error value input
or even:
..._clone(_.getitem(_.string.join(['foo',REQUEST['input']],'.')) => produces
the correct ID "foo.Object", but produces a key error...
so I tried to test a hardcoded name in getitem() and put this into the code:
..._clone(_.getitem('foo.thename',0),... where 'thename' is an existing
ID in the folder foo
=> key error.
I think getitem() somehow cannot handle the object path.
I didn't even find the place in the source where getitem() is defined
The problem is that my application relies on this. I can't proceed...
:-(
thanks so far,
Heiko
--
Heiko Stoermer
MIG Augsburg