public String renameFolder() {
		if (selectedFolder == null) {
			FacesContext.getCurrentInstance().addMessage(null,
					new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error",
							"You have not selected a folder for renaming"));
			return null;
		}

		FolderDTO folder = (FolderDTO) selectedFolder.getData();

		if (folder.getFolderName().equals(selectedFolderName)) {
			FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error",
							"You have not specified a new name for a folder"));
			return null;
		}

		try {
			folderService.renameFolder(folder, selectedFolderName);
			folder.setFolderName(selectedFolderName);
			FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,"Information",
							"Folder successfully renamed"));
			return null;
		} catch (DataProcessingException e) {
			FacesContext.getCurrentInstance().addMessage(null,
					new FacesMessage(FacesMessage.SEVERITY_ERROR, "Error", e.getExceptionMessage()));
			return null;
		}
	}