Task #5636 » exceptionRadioCheckBox.diff

Steffen Ritter, 2009-12-05 18:13

View differences:

Classes/ViewHelpers/Form/RadioViewHelper.php (Arbeitskopie)
93 93

  
94 94
		$nameAttribute = $this->getName();
95 95
		$valueAttribute = $this->getValue();
96
		if ($checked === NULL && $this->isObjectAccessorMode()) {
97
			$propertyValue = $this->getPropertyValue();
96
		if ($checked === NULL && $this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject'))  {
97
            $this->addAdditionalIdentityPropertiesIfNeeded();
98
            $propertyValue = $this->getPropertyValue();
98 99
			// no type-safe comparisation by intention
99 100
			$checked = $propertyValue == $valueAttribute;
100 101
		}
Classes/ViewHelpers/Form/CheckboxViewHelper.php (Arbeitskopie)
91 91

  
92 92
		$nameAttribute = $this->getName();
93 93
		$valueAttribute = $this->getValue();
94
		if ($checked === NULL && $this->isObjectAccessorMode()) {
95
			$propertyValue = $this->getPropertyValue();
94
		if ($checked === NULL && $this->isObjectAccessorMode() && $this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper', 'formObject'))  {
95
                        $this->addAdditionalIdentityPropertiesIfNeeded();
96
                        $propertyValue = $this->getPropertyValue();
96 97
			if (is_bool($propertyValue)) {
97 98
				$checked = $propertyValue === (boolean)$valueAttribute;
98 99
			} elseif (is_array($propertyValue)) {
(1-1/3)