[Zope] Zope scope (namespace ?) question
Charles Morrison
cmorrison@greeleynet.com
Wed, 13 Feb 2002 17:04:07 -0700
I'm wondering if anyone can give me a clue on using or parsing scope
issues in zope.
I'm working on a zope + database application where I need to edit
existing database records. What I'm doing works very well up to a point.
I've created a dtml method which is a cgi form. It send's it's value to
another dtml method which uses a <dtml-in > (to a zmysql method)to grab
the record data and fill it into another cgi form. That form send's the
revised data to another zmysql method. This all works fine when running
the original dtml method as itself or imbedded in a dtml document.
What I'm running into is that if I embed the first dtml method into the
result of another query - like showing all records from a particular
date - I run into a format change for the passed form element I don't
know how to deal with. Specifically: Normally if I enter the value 109
into the form, the value passed to the next method is 106. It works
fine, I expect it and use it that way. When I go out of scope
(apparently), the passed value is ['106','']. This messes up the query
and I get no matches.
I had originally thought that the problem was related to having the
calling form in a directory above the called method. This turned out to
not be the case as it happens when they are in the same directory.
I also copied the content of the cgi form method into the results page
directly (not using the <dtml-var> tag to call it. This didn't make any
difference.
I've tried using <dtml-with REQUEST> when looking up the passed value,
but the result is the same.
Any hints on how I can get a clean value or parse the value so I could
use it without resorting to a python script to pull the number out of
the brackets and quotes ?
Chuck Morrison
cmorrison@greeleynet.com