/**
  * Load the property value to be used for validation.
  *
  * In case the object is a doctrine proxy, we need to load the real instance first.
  *
  * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $validationElement
  * @param string $propertyName
  * @return mixed
  */
 protected function getPropertyValue(\TYPO3\CMS\Form\Domain\Model\ValidationElement $validationElement, $propertyName)
 {
     /**
      * If a confirmation page is set and a fileupload was done before
      * there is no incoming data if the process action is called.
      * The data is only in the session at this time.
      * This results in a negative validation (if a validation is set).
      * Therefore, look first in the session.
      */
     if ($this->sessionUtility->getSessionData($propertyName)) {
         $propertyValue = $this->sessionUtility->getSessionData($propertyName);
     } else {
         $propertyValue = $validationElement->getIncomingField($propertyName);
     }
     return $propertyValue;
 }
 /**
  * Handles confirmation action, presenting the user submitted
  * data again for final confirmation.
  *
  * @param \TYPO3\CMS\Form\Domain\Model\ValidationElement $model
  * @return void
  */
 public function confirmationAction(ValidationElement $model)
 {
     $this->skipForeignFormProcessing();
     if (count($model->getIncomingFields()) === 0) {
         $this->sessionUtility->destroySession();
         $this->forward('show');
     }
     $this->controllerContext->setValidationElement($model);
     $form = $this->formBuilder->buildModel();
     // store uploaded files
     $this->sessionUtility->storeSession();
     $this->view->assign('model', $form);
     $message = $this->formUtility->renderItem($this->typoscript['confirmation.']['message.'], $this->typoscript['confirmation.']['message'], LocalizationUtility::translate('tx_form_view_confirmation.message', 'form'));
     $this->view->assign('message', $message);
 }