[TYPO3-mvc] Displaying a model property of type 'select' as form field using Extbase and Fluid

Thomas "Thasmo" Deinhamer thasmo at gmail.com
Wed Jan 20 00:28:31 CET 2010


Thanks for sharing your idea,
how do you define of which table/field
you want to get the units?

Do you mind also sharing some more
bits of your service class?

Would be really great and helpful!

Thanks a lot,
Thomas


Nathan Lenz schrieb:
> Thomas,
> I made something like this work by creating a service. This service is
> sort of like a static, read-only repository that is used to manage my
> list of units.  It will also do other things related to units, like
> conversion.
> 
> Tx_MyExt_Domain_Service_UnitService->getStandardUnits()
> 
> Then in my action method in the controller:
> 
> $this->view->assign('standardUnits',$unitService->getStandardUnits());
> 
> Then in the Template:
> 
> <f:form.select property="unit" options="{standardUnits}"
> optionValueField="id" optionLabelField="name"></f:form.select>
> 
> Hope this helps,
> --Nathan


More information about the TYPO3-project-typo3v4mvc mailing list