[Zope] Acquisition Problem ?

Richard Moon richard@dcs.co.uk
Fri, 09 Mar 2001 18:55:36 +0000


Can anyone explain what's going on here - please ?

I've got a dtml method 'mydtml_1' which processes a file uploaded via a 
form - like this

<dtml-in "abcfile_read(REQUEST)">
   <dtml-let abc_text=sequence-item>
     <dtml-unless "_.len(abc_text)==0">
       <dtml-var mydtml_2>
     </dtml-unless>
   </dtml-let>
</dtml-in>

In the dtml method mydtml_2 I have some code like this

<dtml-var 
expr="REQUEST.set('abc_text',external_method_that_returns_hello_world(abc_text))>
<dtml-var REQUEST>
<dtml-var abc_text>

What happens is that the
<dtml-var REQUEST> shows abc_text having the new value of "Hello World"

but the
<dtml-var abc_text> shows the value as it was in mydtml_1

Presumably <dtml-var abc_text> is acquiring the value from mydtml_1.

Can anyone tell me why ?

And how to get <dtml-var abc_text> to return the value I want i.e. "Hello 
World" ?

This is Zope 2.2.1


(Note - if I do not put <dtml-var mydtml_2> inside the <dtml-in> and 
<dtml-let> constructs then it works as expected, e.g.
<dtml-call "REQUEST.set('abc_text','Goodbye Forever')">
<dtml-var mydtml_2>

  will render "Hello World" )

Many thanks


Richard Moon
richard@dcs.co.uk