private void addNewTask(View view) {

		//TODO сделать норм ид
		task.setId((long) Utils.randInt(0, 100000));
		fillTask(view);
		try{
			if (errors.size() > 0 || !task.isCorrectTask()) {
				view.getRequest().setAttribute("errors", errors);
			} else {
				view.getRequest().setAttribute("success", ImmutableList.of("Task was added"));
				view.getRequest().setAttribute("task", task);
				if(!taskRepository.addTask(task)){
					view.getRequest().setAttribute("errors", ImmutableList.of("Task wasn't added"));
				}
			}
		} catch (Exception ex) {
			logger.log(Level.SEVERE, ex.getMessage());
		}
	}