public void buttonClick(ClickEvent event) { repository.remove(object); } });
@Override @SuppressWarnings({ "unchecked", "rawtypes" }) public void deleteRepositoryObject(String entityType, String entityId) { ObjectRepository objectRepository = getGenericObjectRepository(entityType); RepositoryObject repositoryObject = objectRepository.get(entityId); // ACE-239: avoid null entities being passed in... if (repositoryObject == null) { throw new IllegalArgumentException("Could not find repository object!"); } objectRepository.remove(repositoryObject); }
/** * Called by the remove-item button to remove a repository object from the repository. * * @param itemID * the ID of the item to remove from the repository, cannot be <code>null</code>. */ protected void handleItemRemoveObject(Object itemID) { getRepository().remove(getFromId(itemID)); }