[Zope] List editing with page templates
Richard Wesley
hawkfish@electricfish.com
Fri, 29 Mar 2002 09:24:55 -0800
I need to create a form (using page templates) that does roughly this:
<BasicData>
<selectable list of homogenous objects to attach to BasicData>
<list of homogenous objects already attached to BasicData>
The problem is that I can't seem to make the attached list
persistent. In my action script for attaching a new list object, I
check the request to see if the list is present and append the
selected object to the attached object list, but the script never
seems to have access to the request passed to the form.
Slightly simpler test script (trying to accumulate two form variables):
names=[]
if request.has_key('names'):
names=request.get('names')
names.append ({'name':name,'age':age})
request.set('names',names)
return container.form()
What am I missing?
TIA,
- rmgw
<http://www.electricfish.com/hawkfish/>
----------------------------------------------------------------------------
Richard Wesley Electric Fish, Inc. hawkfish@electricfish.com
"I found it at the bottom of a locked filing cabinet, in a disused
lavatory with a sign on the door saying 'Beware of the leopard.'"
- Douglas Adams, _The Hitchhiker's Guide to the Galaxy_