company logo

Property :: canRename - Can selected instance be renamed

The function checks, whether an instance has been selected in the property handle and whether the selected instance can be updated or not.The function returns true, when renaming the instance (changing key value for current index) is possible and false otherwise.

Returning true always implies canUpdateCollection(), but not necessarily reverse. There are several reasons for denying renaming the instance:

  1. The property handle is opened for read, only
  2. The instance is persistent write protected
  3. The instance is locked by another property handle
  4. Key cannot be updated into base extent (super set.canUpdateCollection())
  5. The collection has not got an order key
  6. The current application does not have rights for updating the instance (disabled by context)
  7. The instance is an embedded part of another instance which cannot be renamed
  8. The property handle is invalid.
  9. Updating is denied by context handler (client or server) TypeContext::canRename()
Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation details

bool Property  :: canRename (  )