[TYPO3-mvc] Extbase PropertyMapper in 1.2.0 (TYPO3 4.4)

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Thu Mar 17 17:51:46 CET 2011


Franz Koch wrote:
> Hey,
>
>> Template looks like this now:
>> <f:form name="customer" object="{customer}" action="update">
>> <f:for each="{customer.cartItems}" as="cartItem">
>> {cartItem.product.title} &times; <f:form.textbox
>> name="cartItems[{cartItem.uid}][quantity]" value="{cartItem.quantity}"
>> size="2"/>
>> <f:form.hidden name="cartItems[{cartItem.uid}][__identity]"
>> value="{cartItem.uid}"/>
>> </f:for>
>
> have you checked the resulting HTML code? You have to take care that
> your cartItems will be submitted as properties of "customer", so either
> try:
>
> name="customer[cartItems][{cartitem.uid}]..."
>
> or use the attribute "property" instead of "name".

Hoi!

Thanks for your reply!

When setting the correct name for the fields
to "customer[..." the cart again will be empty
when submitting the form. That's the same behavior
as before.

I can't use the property attribute, it will only show an empty field:

<f:form.textbox property="cartItem.property" size="2"/>

So, I think the problem is maybe related to the configuration,
maybe specifically to the persistence settings of Extbase.

I will have a look at this later today
or sometimes in the next few days hopefully.

Thanks a lot for further advices!

Regards,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list