public String deleteMessage() {
		if (selectedMessages2.length == 0) {
			FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error",
					"You have not selected messages for deletion"));
			return null;
		}

		try {
			messageService.deleteMessage(selectedMessages2);
			for (MessageDTO message : selectedMessages2) {
				listOfMessages.remove(message);
			}
			resetSelectedMessages();
			FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO,
					"Information","Messages successfully deleted"));
			return null;
		} catch (DataProcessingException e) {
			FacesContext.getCurrentInstance().addMessage(null,
					new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error",e.getExceptionMessage()));
			return null;
		}
	}