Logo Search packages:      
Sourcecode: zope-formulator version File versions  Download package

def Formulator::Form::ZMIForm::manage_renameObject (   self,
  id,
  new_id,
  REQUEST = None 
)

Rename a particular sub-object, the *old* way.
FIXME: hack that could be removed once Zope 2.4.x
goes back to a useful semantics...

Definition at line 698 of file Form.py.

00698                                                            :
        """Rename a particular sub-object, the *old* way.
        FIXME: hack that could be removed once Zope 2.4.x
        goes back to a useful semantics..."""
        try: self._checkId(new_id)
        except: raise CopyError, MessageDialog(
                      title='Invalid Id',
                      message=sys.exc_info()[1],
                      action ='manage_main')
        ob=self._getOb(id)
        if not ob.cb_isMoveable():
            raise CopyError, eNotSupported % id
        self._verifyObjectPaste(ob)
        try:    ob._notifyOfCopyTo(self, op=1)
        except: raise CopyError, MessageDialog(
                      title='Rename Error',
                      message=sys.exc_info()[1],
                      action ='manage_main')
        self._delObject(id)
        ob = aq_base(ob)
        ob._setId(new_id)

        # Note - because a rename always keeps the same context, we
        # can just leave the ownership info unchanged.
        self._setObject(new_id, ob, set_owner=0)

        if REQUEST is not None:
            return self.manage_main(self, REQUEST, update_menu=1)
        return None

    #security.declareProtected('View', 'get_fields_raw')
    #def get_fields_raw(self):
    #    """Get all fields, in arbitrary order.
    #    """
    #    return filter(lambda obj: hasattr(obj.aq_explicit, 'is_field'),
    #                  self.objectValues())

    security.declareProtected('View', 'has_field')
    def has_field(self, id, include_disabled=0):


Generated by  Doxygen 1.6.0   Back to index