[TYPO3-mvc] Displaying a model property of type 'select' as form field using Extbase and Fluid
Nathan Lenz
typo3 at k9tfk.com
Tue Jan 19 23:36:48 CET 2010
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