[TYPO3-mvc] Edit of @lazy property
Xavier Perseguers
typo3 at perseguers.ch
Tue Nov 30 16:31:39 CET 2010
Hey,
>>>> Is this a known issue? Already fixed? Using slightly patched version of
>>>> Extbase in 4.4 (to have fix of caching issue).
>>> AFAIK you don't have to provide a "value" attribute if you bound the
>>> field to a property. Please give it a try after removing the value
>>> attribute. If this still doesn't work, the following should solve the
>>> problem. Instead of value="{company.billingContact}" use
>>> value="{company.billingContact.uid}"
>> You're right! Removing the "value" attribute then works when @lazy is used.
>>
>> Funny, I had the problem with undefined __toString() method which just
>> got committed.
>
> Interesting point. With value="{company.billingContact}" the selected
> value key will become "classname:uid", when company.billingContact is
> an lazy object, which will be the case, when it's not used before.
>
> So it would be better to return the uid only in default __toString()
> method. Otherwise we have to adapt much more code, I think.
Thanks for pointing that out. I did not pay attention to the new call to
__toString() except for the bug report I got and I did not try to
actually update the record, I just showed the edit form.
+1 to have this fixed otherwise I'll get headache next time I encounter
this bug ;-)
Xavier
More information about the TYPO3-project-typo3v4mvc
mailing list