[TYPO3-mvc] Tx_Fluid_ViewHelpers_Form_RadioViewHelper in newAction View

Steffen Ritter info at rs-websystems.de
Tue Dec 1 13:46:37 CET 2009


Axel Müller schrieb:
>>> with the following lines in my Formtemplate new.html for a newAction:
>>>
>>> <f:form.radio property="barrierefreiheit" value="1" /> ja 
>>> <f:form.radio property="barrierefreiheit" value="0" checked="checked"
> />
>>> nein
>>>
>>> I get this error-message:
>>>
>>> RuntimeException
>>> No value found for key
> "Tx_Fluid_ViewHelpers_FormViewHelper->formObject"
>>> Without this line, the Form functions. Is there something wrong with my
>>> code? 
>>>
>>>
>>> I digged into fluid and found in
>>>
>>> fluid/Class/ViewHelpers/Form/RadioViewHelper.php line 98:
>>>     $propertyValue = $this->getPropertyValue();
>>>
>>> $this->getPropertyValue() is defined in 
>>> fluid/Class/ViewHelpers/Form/AbstractFormFieldViewHelper.php line 149
>>>
>>> line 150 is the Problem:
>>> $formObject =
>>>
> $this->viewHelperVariableContainer->get('Tx_Fluid_ViewHelpers_FormViewHelper',
>>> 'formObject');
>>>
>>> Sorry, if I ask at the wrong place or ask a faq.
>>>
>>> greetings,
>>> Axel Müller
>>>
>> I digged into this problem and found a solution, just a missing 
>> condition and one  missing statement in each RadioBox and CHeckbox...
> great! Where is it? :-)
> 
> greeings
> Axel
> 
> 
right now, nowhere, since i'm currently on other "formbugs" to...

if you need in right now:

There's in both problemativ viewhelper the following:
  if ($checked === NULL && $this->isObjectAccessorMode()) {
                         $propertyValue = $this->getPropertyValue();


replace it with:

if ($checked === NULL && $this->isObjectAccessorMode() && 
$this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 
'formObject'))  {
                         $this->addAdditionalIdentityPropertiesIfNeeded();
                         $propertyValue = $this->getPropertyValue();




regards

Steffen


More information about the TYPO3-project-typo3v4mvc mailing list