[TYPO3-mvc] Setting typeconverter of childobject
Douwe Doornbos
d.doornbos at rug.nl
Thu Jan 29 17:36:45 CET 2015
Hello,
I have a form with order-data and several orderlines with an amount-field. I want to use a typeconverter to allow both dot and comma as decimal separator, but convert both of them to float.
For the main object I can set a typeconverter in the initializeUpdateAction() in the controller:
public function initializeUpdateAction() {
$this->arguments['order']
->getPropertyMappingConfiguration()
->forProperty('orderProperty')
->setTypeConverter(new \Cmp\Ext\Property\TypeConverter\AmountToFloatConverter);
}
But how can I set a typeconverter for a property in a child domain (orderLine.amount)? I tried initializeUpdateAction() in de orderLine controller, but it gets never executed, when i submit the form.
I'm using TYPO3 6.2.9
With kindly regards,
Douwe.
More information about the TYPO3-project-typo3v4mvc
mailing list