[Zope] Creating a List from a SQLMethod
Timothy Grant
tjg@avalongroup.net
Mon, 03 Jan 2000 04:34:28 -0800
Hi,
I've got a page that displays a <select> list based on the return values
from a SQLMethod. It works exactly as expected.
I have now determined a need to display the exact same <select> multiple
times on the same page.
The original code to build the select list looks something like this:
<select name="Category">
<option>(None)
<dtml-in CategorySelectQuery start=query_start>
<option><dtml-var category>
</dtml-in>
</select>
I thought I could do something like the following:
<select name="Category">
<option>(None)
<dtml-in CategorySelectQuery start=query_start>
<option><dtml-var category>
<dtml-call "REQUEST.set('catlist:list', category)">
</dtml-in>
</select>
And then later on the page do this
<select name="category">
<dtml-in catlist>
<option><dtml-var "_['sequence-item']">
</dtml-in>
</select>
Unfortunately Zope returns a Key error on catlist.
What am I doing wrong?
Thanks.
--
Stand Fast,
tjg.
Chief Technology Officer tjg@exceptionalminds.com
Red Hat Certified Engineer www.exceptionalminds.com
Avalon Technology Group, Inc. (503) 246-3630
>>>>>>>>>>>>EXCEPTIONAL MINDS, INNOVATIVE PRODUCTS<<<<<<<<<<<<