Property :: canRemove - Can selected instance be removed from collection
The function checks, whether an instance has been selected in the property handle and whether the selected instance can be deleted or not.The function returns true, when removing the instance from collection (without deleting it) is possible and false otherwise.
When a collection is an owning or depending collection, instances are deleted when being removed from collection. In this case, canDelete() should be called, instead, which is not automatically implied. When intending to explicitly delete an instance from a not owning collection one also should check this by callingcanDelete().
Returning true always implies canUpdateCollection(), but not necessarily reverse. There are several reasons rejecting removing the instance:
- The property handle is opened for read, only
- The current application does not have rights for removing the instance (disabled by context)
- The instance is an embedded part of another instance which cannot be removed
- The property handle is invalid.
- Deletion is denied by context handler (client or server) TypeContext::canRemove()
The value is true when the function was executed successfully. Otherwise the value is set to false.