Bug #64057
closedCheckbox viewhelper checked attribute not set for objects
100%
Description
Given a form object with a property which may contain a list of objects (array/ObjectStorage) as well as a list of checkboxes built from all available objects for that property:
<f:form object="{object}" name="object"> <f:for each="{availableObjects}" as="availableObject"> <f:form.checkbox property="foo" value="{availableObject}" multiple="1"/> </f:for> </f:form>
If you select one of the options, the checked
attribute is not properly set on the subsequent form display. This is due to the fact that the CheckboxViewHelper
converts the incoming value for the value
attribute to an identifier through AbstractFormFieldViewHelper::getValue()
but does not do the same for the property value. Thus e.g. an UID like 42
is searched in an array of objects which will never succeed. (Source)
A possible fix is to run PersistenceManager->getIdentifierByObject
on each value within property
too, thus comparing e.g. an UID with an array of UIDs. This is the same what AbstractFormFieldViewHelper::getValue()
does when $convertObjects
is set to TRUE
(default).
Updated by Gerrit Code Review about 10 years ago
- Status changed from New to Under Review
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Gerrit Code Review about 10 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Gerrit Code Review almost 10 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Gerrit Code Review almost 10 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Gerrit Code Review almost 10 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Gerrit Code Review almost 10 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Anja Leichsenring over 9 years ago
- Sprint Focus set to Stabilization Sprint
Updated by Anja Leichsenring over 9 years ago
- Target version changed from next-patchlevel to 7.2 (Frontend)
Updated by Gerrit Code Review over 9 years ago
Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/35668
Updated by Mathias Brodala over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset bf15f29d999f7f5d3e593f6767f2f5206856edd7.
Updated by Gerrit Code Review over 9 years ago
- Status changed from Resolved to Under Review
Patch set 1 for branch TYPO3_6-2 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/38880
Updated by Andreas Fernandez over 9 years ago
- Status changed from Under Review to Resolved
Applied in changeset 460623f8f1854718f4816f375ae9c5fe0680ffec.
Updated by Riccardo De Contardi about 7 years ago
- Status changed from Resolved to Closed