Set<Attachment> attachments = new HashSet<Attachment>();
for (Long aid : selectedAttachments)
attachments.add(filesService.getAttachment(aid));
note.setAttachments(attachments);
}
note.setColor(new Color(Integer.parseInt(color.substring(1, 3), 16), Integer.parseInt(color.substring(3, 5), 16), Integer.parseInt(color.substring(5), 16)));
try {
notesService.saveNote(note);
} catch (Exception e) {
getContext().getValidationErrors().addGlobalError(new LocalizableError("scheduling.notPossibleToSchedule"));
return getContext().getSourcePageResolution();