@Override
  public ReportData getReportData() {
    ReportData data = new ReportData(function);

    data.setAccepted((String) selectAcceptance.getValue());
    System.out.println(selectEndDate.getValidators().toString());
    data.setReportContent((ReportContent) selectContent.getValue());
    data.setDateEnd(selectEndDate.getValue());
    data.setDateStart(selectStartDate.getValue());
    data.setType(ReportType.EXPIRED_GOODS);

    return data;
  }
  private FormDeletion getFormData(FormDeletion form) {
    form.setDeletionDate(inputDeletionDate.getValue());
    form.setInformation(information.getValue());
    form.setQuantity(inputGoodsQuantity.getValue());
    form.setIdGoods((String) inputGoodsSelect.getValue());
    form.setDeletionId(this.deletionId);
    form.setPrice(inputGoodsPrice.getValue());

    return form;
  }
 @Override
 public FormDeletion getFormData() {
   FormDeletion form = new FormDeletion(function);
   form.setDeletionDate(inputDeletionDate.getValue());
   form.setInformation(information.getValue());
   form.setQuantity(inputGoodsQuantity.getValue());
   form.setIdGoods((String) inputGoodsSelect.getValue());
   form.setDeletionId(this.deletionId);
   form.setPrice(inputGoodsPrice.getValue());
   return form;
 }
  @Override
  protected void setup(VaadinRequest request) {
    final Label dateValue = new Label(initialDateString);
    dateValue.setId("dateValue");

    final TimeZone timezone = TimeZone.getTimeZone("GMT");
    final SimpleDateFormat dateformat = getDateFormat(timezone);
    final DateField dateField = getDateField(timezone, dateformat);

    addComponent(dateValue);
    addComponent(dateField);

    dateField.addValueChangeListener(
        event -> dateValue.setValue(dateformat.format(dateField.getValue())));
  }
  protected void handleFormSubmit() {
    try {
      // Check for errors
      form.commit(); // will throw exception in case validation is false

      // Create task
      Task task = taskService.newTask();
      task.setName(nameField.getValue().toString());
      task.setDescription(descriptionArea.getValue().toString());
      task.setDueDate((Date) dueDateField.getValue());
      task.setPriority(priorityComboBox.getPriority());
      task.setOwner(ExplorerApp.get().getLoggedInUser().getId());
      taskService.saveTask(task);

      // close popup and navigate to new group
      close();
      ExplorerApp.get().getViewManager().showTasksPage(task.getId());

    } catch (InvalidValueException e) {
      // Do nothing: the Form component will render the errormsgs automatically
      setHeight(350, UNITS_PIXELS);
    }
  }