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

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Thu Mar 17 12:11:01 CET 2011


Nikolas Hagelstein wrote:
>
> If this does not work keep it as it is an "update" the parenten property
> withi what you got from the form.

Hi Nikolas!

Thanks for the reply.

I changed the template and the update action now accordingly,
and in fact, the cart item(s) don't get deleted anymore, but
now they are _NOT_ updated anymore.

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>
	
	<f:form.submit name="submit" value="{f:translate(key: 
'cart.index.update_cart')}"/>
</f:form>

The update action like this:
public function updateAction(Tx_HypeStore_Domain_Model_Customer $customer) {
	$this->customerRepository->update($customer);
	$this->redirect('index');
}

Even with the redirect removed, it doesn't work, if I change the
quantity of the cart item, nothing changes after the form was submitted.
("Nothing changes" means, that the page reloads, but the quantity
is the same as it was before I changed it to another value. The quantity
is 10, I change it to 12, submit the form, but then it's 10 again.)

Any further ideas?

Thanks a lot,
Thomas


More information about the TYPO3-project-typo3v4mvc mailing list