[TYPO3-mvc] _hmac behaving strangely
Braulio J. Solano-Rojas
braulio at solsoft.biz
Sat Aug 21 03:34:15 CEST 2010
El 20/08/2010 02:56 p.m., Braulio J. Solano-Rojas escribió:
> [Snip]
>
> <f:form method="post" action="create" object="{newQuote}"
> onsubmit="validate();">
That helper needed the parameter name on it. I did not realized that I
eliminated that parameter before...
I found out the solution because debugging the getName method of
Tx_Fluid_ViewHelpers_Form_AbstractFormFieldViewHelper I saw that there
is an if ($this->isObjectAccessorMode()) that reads the property
parameter inside of it. The condition was always false. The method
isObjectAccesorMode checks that the form has a name with
$this->viewHelperVariableContainer->exists('Tx_Fluid_ViewHelpers_FormViewHelper',
'formName');.
I think that it is not very intuitive that a form needs a name in order
to be in object accesor mode. In fact, what is logical for me is that
the parameter object indicates that mode. Maybe that method should be
something like:
protected function isObjectAccessorMode() {
return $this->arguments->hasArgument('property')
&& $this->arguments->hasArgument('object');
}
However that method written like that will not work because in that
context there is not an object argument.
I really think that the object property of the form helper should
determinate the object mode instead of the name parameter.
Best regards,
B.
More information about the TYPO3-project-typo3v4mvc
mailing list