[TYPO3-mvc] Edit of @lazy property
Xavier Perseguers
typo3 at perseguers.ch
Tue Nov 30 14:54:06 CET 2010
Hey Franz,
>> I have an edit method which allows me to change the billing contact of a
>> company. This contact is a @lazy loaded Person object.
>>
>> My edit form is as follows:
>>
>> <f:form.select id="billingContact" property="billingContact"
>> value="{company.billingContact}" options="{company.persons}"
>> optionLabelField="name" />
>>
>> When I show the form, I have first person in the list selected (wrong!)
>>
>> When I remove the @lazy attribute on billingContact in Company model, I
>> get the valid person selected.
>>
>> 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.
Thanks
Xavier
More information about the TYPO3-project-typo3v4mvc
mailing list