[TYPO3-mvc] Property mapping of m:n and n:1 related objects in a New.html form to create new object AND related objects?

Roland most.wanted at gmx.at
Mon Apr 30 17:17:49 CEST 2012


> the object has m:n relations and n:1 relations to other objects in the
> domain model. so i used <f:form.select /> and <f:form.checkbox /> in the
> fluid template to put selectboxes and checkboxes into the form.
>
> how can i map theses form elements to object properties?

ok, this works for n:1 relations:

<f:form.select property="category" options="{categories}" />

but i can not get m:n relations work via checkboxes:

> --- quote ---
> <f:for each="{categories}" as="category">
> <f:form.checkbox property="categories" value="{category}" />
> </f:for>
> --- /quote ---
>
> ...i get these error messages:
>
> --- quote ---
> Checkbox viewhelpers can only be bound to properties of type boolean or
> array. Property "categories" is of type
> "Tx_Extbase_Persistence_ObjectStorage".
> --- /quote ---


More information about the TYPO3-project-typo3v4mvc mailing list