Skip to content
Snippets Groups Projects
Commit 223e203f authored by Markus Guenther's avatar Markus Guenther Committed by Anja Leichsenring
Browse files

[BUGFIX] Submitted form data has precedence over value argument

This adjusts the behavior of all Form ViewHelpers so that any
submitted value is redisplayed even if a "value" argument has been
specified.

The issue with this, however, was that upon re-display of the form due
to property-mapping or validation errors the value argument had
precedence over the previously submitted value.

This is a breaking change if you expect the previous behavior of form
ViewHelpers always being pre-populated with the specified value
attribute / bound object property even when re-displaying the form upon
validation errors.
Besides this change deprecates
``AbstractFormFieldViewHelper::getValue()``. If you call that method in
your custom ViewHelpers you should use
``AbstractFormFieldViewHelper::getValueAttribute()`` instead and call
``AbstractFormFieldViewHelper::addAdditionalIdentityPropertiesIfNeeded()``
explicitly if the ViewHelper might be bound to (sub)entities.

The default usage of getValueAttribute() not respect the submitted form data, because not every viewhelper need
this feature. But you can enable the usage of the form data by setting the
AbstractFormFieldViewHelper::respectSubmittedDataValue to TRUE.

Change-Id: I05d9996df0a5594390ff7a005bbee7f2ceeb06bc
Resolves: #66588
Related: #34186
Releases: master
Reviewed-on: http://review.typo3.org/42298


Reviewed-by: default avatarSascha Wilking <sascha.wilking@hmmh.de>
Tested-by: default avatarSascha Wilking <sascha.wilking@hmmh.de>
Reviewed-by: default avatarSusanne Moog <typo3@susannemoog.de>
Reviewed-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: default avatarAnja Leichsenring <aleichsenring@ab-softlab.de>
parent 2d7e5f85
Branches
Tags
No related merge requests found
Showing
with 567 additions and 179 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment