[Zope] ID update fails to change ID in ZMI

pieter claassen pieter at countersnipe.com
Mon May 3 17:27:18 EDT 2004


I have the following code and when I update the edit through the
editform interface, then the id in the ZMI does not change. When I try
to rename the item, it works as long as the internal and ZMI values are
the same, otherwise I get weird errors:
1. If they are different and I rename the id through the ZMI to
something new, it stack traces.
2. If they are different and I rename the id through the ZMI to the
internal representation, then no error but also no change to the value
in the ZMI.

Any comments?

Thanks,
Pieter


     46  _editForm=DTMLFile('dtml/edit',globals())
     47
     48  security.declareProtected('View management screens','editForm')
     49
     50  def editForm(self,REQUEST,manage_tabs_message=None):
     51   "returns the edit form"
     52   return self._editForm(REQUEST,globals())
     53
     54  security.declareProtected('Change shopping item','editItem')
     55
     56  def editItem(self,id,REQUEST=None,RESPONSE=None):
     57   "Edit a shopping item"
     58   self.id = id
     59   if REQUEST is not None:
     60    message="Item_updated"
     61    return self._editForm(REQUEST,manage_tabs_message=message)





More information about the Zope mailing list