Task #5636

Task #26664: Clean up Form ViewHelpers

Task #26658: Make Form ViewHelpers consistent

Form_RadioViewHelper and CheckBoxViewHelper miss check for existing object before it is accessed.

Added by Steffen Ritter over 12 years ago. Updated over 8 years ago.

Status:
Under Review
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-12-05
Due date:
% Done:

0%

Estimated time:
Has patch:
No

Description

If you have an form for creating an Object currently this will fail with an exception.
The other FormViewHelper use the getValue() function to determine an property-value of object assigned to the form.
Since Checkbox/Radiobox has to compare against a value to decide if selected, they have to fetch the property-value on their own.

in getValue a check on $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject') and an call to $this->addAdditionalIdentityPropertiesIfNeeded(); are performed before acessing the property. If you do so in RadioBox and Checkbox too, no exception anymore.

regards

Steffen


Files

exceptionRadioCheckBox.diff (1.71 KB) exceptionRadioCheckBox.diff Steffen Ritter, 2009-12-05 18:13
radioProperty-5636.diff (1017 Bytes) radioProperty-5636.diff try/catch for exception Peter Niederlag, 2011-02-03 18:27
radioProperty-5636.diff (962 Bytes) radioProperty-5636.diff try/catch ( Peter Niederlag, 2011-02-03 18:30

Related issues

Related to TYPO3.Fluid - Task #9214: Improve handling of bound properties in checkbox, radio and select ViewHelpersClosedBastian Waidelich2010-08-09

Actions

Also available in: Atom PDF