[Zope] Updating Zclass object titles
Laurie Nason
laurien@tiger.3dem.bioch.bcm.tmc.edu
Tue, 3 Jul 2001 10:42:35 -0500
I am having the same problem - I have an instance of a zclass that I need to
update only a couple of the properties of, not all of them.
The basic idea is that the user checks a checkbox saying I want to update
this property and also some checkboxes for each of the instances that they
want to update.
My dtml document runs through each of the instances selected and then tries
to update the selected properties - however, as the previous email I am
getting no change of the properties!
I do not want to use the catch all of using the REQUEST object and
editProperties.. as there are fields on the form which don't need to be
updated.
Here is my dtml code..
<dtml-in "REQUEST.form.values()">
<dtml-if "_.str(_['sequence-item'])[:9]=='Specimen_'">
<dtml-call "REQUEST.set('specimen',_['sequence-item'])"> <---This is the
name/id of the object I need to update
<dtml-in chkbox>
<dtml-call "REQUEST.set('keyvalue',_[_['sequence-item']])"> <---This
is the name of the property
<dtml-call "REQUEST.set('keyname',_['sequence-item'])"> <---This
is the new value of the property
<dtml-call
expr="_.getitem(specimen).propertysheets.Basic.manage_changeProperties(keyna
me=keyvalue)">
</dtml-in>
</dtml-if>
</dtml-in>
Other things I have tried (unsuccesfully of course!):
If I change the dtml-call to dtml-var and it returns none - no mention of an
error
If I try to use dtml-with "_.getitem(specimen)" but still it doesn't change
the property
Laurie
Any ideas as to how I can do this
-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Sherman Lambert (State Public Defenders Office)
Sent: Tuesday, July 03, 2001 9:19 AM
To: zope@zope.org
Subject: [Zope] Updating Zclass object titles
Hello all,
I am trying to edit an instance of a ZClass to update the title. I am using
the dtml-
<dtml-call "doc.propertysheets.Basic.manage_changeProperties(REQUEST)">
where
this is in the submit form of a HTML form, with "title" as a field. This
will update all
properties except the title. I have l also tried directly updating it by
calling
<dtml-call
"doc.propertysheets.Basic.manage_changeProperties(title=new_title)">
I have tried trapping exceptions, and neither of these calls raise one. So
does anybody know
what's the deal?
Sherman
_______________________________________________
Zope maillist - Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://lists.zope.org/mailman/listinfo/zope-announce
http://lists.zope.org/mailman/listinfo/zope-dev )