[Zope] Why doesn't setting REQUEST keys work inside <dtml-with REQUEST> ?
Don Hopkins
xardox@mindspring.com
Thu, 4 Apr 2002 14:08:43 -0800
Here is the output of a test dtml document, and the source, that
demonstrates that setting keys of REQUEST inside a <dtml-with REQUEST> does
not work. Is dtml designed to misbehave this way, or is it a bug? Is the
<dtml-with REQUEST> superfluous? Why does it change the behavior of setting
keys? Is there any way to work around the problem? Thanks!
-Don
test
This is the test Document.
Foo should be "one", and is "one".
Foo should be "two", and is "two".
Foo should be "three", and is "three".
HOWEVER:
Foo is now "three".
Foo should be "one", and is "three".
Foo should be "two", and is "three".
Foo should be "three", and is "three".
BUT THEN:
Foo is now "three".
Foo should be "one", and is "one".
Foo should be "two", and is "two".
Foo should be "three", and is "three".
<dtml-var standard_html_header>
<h2><dtml-var title_or_id></h2>
<p>
This is the <dtml-var id> Document.
</p>
<dtml-call expr="REQUEST.set('foo', 'one')">
Foo should be "one", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'two')">
Foo should be "two", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'three')">
Foo should be "three", and is "&dtml-foo;".<br>
<p>HOWEVER:<p>
<dtml-with REQUEST>
Foo is now "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'one')">
Foo should be "one", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'two')">
Foo should be "two", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'three')">
Foo should be "three", and is "&dtml-foo;".<br>
</dtml-with>
<p>BUT THEN:<p>
Foo is now "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'one')">
Foo should be "one", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'two')">
Foo should be "two", and is "&dtml-foo;".<br>
<dtml-call expr="REQUEST.set('foo', 'three')">
Foo should be "three", and is "&dtml-foo;".<br>
<dtml-var standard_html_footer>