[TYPO3-mvc] How to edit (multiple) child-objects?

Johannes C. Schulz - EnzephaloN IT-Solutions info at enzephalon.de
Tue Mar 13 17:56:47 CET 2012


Hello list

Doesn't anyone has an idea, how to solve this problem?

Hopefully
Johannes

-----Ursprüngliche Nachricht-----
Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org
[mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von
Johannes C. Schulz - EnzephaloN IT-Solutions
Gesendet: Freitag, 9. März 2012 13:04
An: 'TYPO3 v4 MVC project'
Betreff: [TYPO3-mvc] How to edit (multiple) child-objects?

Hello list.
Again I have to ask you about my halting problem:
I have an root-object called "accreditation", this has childs called
"person" of type ObjectStorage. Each person can have one or more "passport"
of type ObjectStorage.
How can I assign passports for each person in one form. I tried to use a
hacky-way by Lorenz Ulrich, but this only worked if I did a "setProperty()"
- if I did an "addProperty" on the $personObject (generated by
personRepository->findOneByProperty) an error "member function on
non-object" was thrown. 
So I tried the "right" way, using the property-tag inside a f:form.select
like this:
<f:for each="{accreditation.persons}" as="person"><f:form.select
property="persons.passport" options="{passports}"
optionLabelField="passportname" multiple="TRUE" size="6" /> </f:for> also
tried:

<f:for each="{accreditation.persons}" as="person"><f:form.select
property="{persons.passport}" options="{passports}"
optionLabelField="passportname" multiple="TRUE" size="6" />  </f:for> But
here I got other errors: "Given property name is not of type string." 
or
2nd: "The form field name "[]" is invalid. Reason: "[]" used not as last
argument."
Now I do not have any more ideas. Also I tried to write
propery="person.passport" or property="{person.passport}".

What should I write inside the "property"-tag inside the select to access
the property of a child-object?
Hope someone can help!

Best regards
Johannes

_______________________________________________
TYPO3-project-typo3v4mvc mailing list
TYPO3-project-typo3v4mvc at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc




More information about the TYPO3-project-typo3v4mvc mailing list