[Zope] Formulator override method does not work

cgreen cgreen@ttsg.com
Mon, 14 Jan 2002 10:33:05 -0500


Help!!!

I am using the Formulator product in an attempt to create a 
MulitListField which will select from a list of topics,
which are properties of the documents in a folder.

The override method is a python script:

results=[]
for object in context.objectValues('STX_Document'):
   if object.getProperty('topic') != '':
   tuple = object.topic, object.topic
   if tuple not in results:
       results.append(tuple)

   results.sort()
  
return results


The script works in the "Python Script" manage window when I select the 
"test" tab. But when I actually run the DTML
file that calls the form, I get an empty multi-list field. I've 
downloaded the Wing IDE and stepped through code: it seems
to have identified the override method properly, but it doesn't seem to 
do anything with it. The form code follows:

<table border="0">

<dtml-in "form.get_fields()">
<dtml-let field=sequence-item>
<tr>
<td><b>Sort by <dtml-var "field.get_value('title')"></b></td>
</tr>
<tr>
<td><dtml-var "field.render()"></td>
<td><dtml-var "field.get_value('description')"></td>
</tr>

</dtml-let>
</dtml-in>

<tr>
<td><input type="submit" value="Select"></td>
</tr>

</table>

<dtml-var "form.footer()">


Am I doing something wrong???