Bug #8854

Task #26664: Clean up Form ViewHelpers

Task #26658: Make Form ViewHelpers consistent

form.checkbox ViewHelper throws Exception in newAction

Added by Bastian Waidelich over 9 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Must have
Category:
ViewHelpers
Start date:
2010-07-14
Due date:
% Done:

100%

Has patch:
No

Description

When using the form.checkbox ViewHelper in ObjectAccessorMode (bound to a property of the form object) this leads to an error when the form object is NULL (e.g. in the newAction) because the type of the property (array / boolean) can't be determined.
To avoid this issue, we need a new argument "multiple" that will make sure, that "[]" are appended to the checkbox field name.


Related issues

Related to TYPO3.Fluid - Task #9214: Improve handling of bound properties in checkbox, radio and select ViewHelpers Closed 2010-08-09
Related to TYPO3 Core - Bug #61529: Cannot ensure checkbox for multiple values Closed 2014-09-11
Duplicated by TYPO3.Fluid - Task #6004: Checkbox viewHelper throws exception in "newAction" method. Closed 2010-01-13

Associated revisions

Revision 97e44d5d (diff)
Added by Bastian Waidelich about 8 years ago

[BUGFIX] form.checkbox ViewHelper throws Exception in newAction

This adds an argument "multiple" to the checkbox ViewHelper
which makes it possible to mark the property as multi value
even if the bound object is NULL.

Besides the ViewHelper can now be bound to all scalar properties,
arrays and Traversable objects.
This change is backwards-compatible.

Change-Id: I2c024d6a0bceaeb65ed04847e76fb44ccc238139
Fixes: #8854
Releases: 1.1

History

#1 Updated by Bastian Waidelich over 9 years ago

  • Tracker changed from Feature to Bug
  • Subject changed from form.checkbox ViewHelper needs an "multiple" argument to form.checkbox & form.radio ViewHelpers do not work in newAction
  • Priority changed from Should have to Must have

#2 Updated by Bastian Waidelich over 9 years ago

  • % Done changed from 0 to 80

#3 Updated by Sebastian Kurfuerst almost 9 years ago

  • Parent task set to #26658

#4 Updated by Robert Lemke over 8 years ago

  • Target version changed from 1.0 beta 2 to 1.0.0

#5 Updated by Karsten Dambekalns over 8 years ago

  • Target version deleted (1.0.0)

#6 Updated by Bastian Waidelich about 8 years ago

  • Subject changed from form.checkbox & form.radio ViewHelpers do not work in newAction to form.checkbox ViewHelper throws Exception in newAction
  • Target version set to 1.1
  • Has patch set to No

#7 Updated by Bastian Waidelich about 8 years ago

  • Tracker changed from Task to Bug

#8 Updated by Gerrit Code Review about 8 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7856

#9 Updated by Gerrit Code Review about 8 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/7856

#10 Updated by Sebastian Kurfuerst about 8 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 80 to 100

Also available in: Atom PDF