[TYPO3-mvc] Edit 1:n connection in Fluid Form
christian oettinger
christian.oettinger at gmx.de
Sat Oct 23 20:34:13 CEST 2010
Hello all,
I'm new to the List an (sorry!) quite new to Extbase/Fluid as well.
Maybe my question ist trivial, but I did not find a solution, I hope
someone can help.
My Model has a Root "Patient". It has some Properties itself, a (1:1)
child "FirstInfusion" and, amongst others, some (1:n) childs "Diagnosis".
It's fantastically easy to make a new Object in Fluid:
<f:form.textbox property="country" /><br />
<f:form.textbox property="firstInfusion.firstInfDate" /><br />
<f:form.textbox property="diagnosis.0.diagnosisName" /><br />
<f:form.textbox property="diagnosis.1.diagnosisName" /><br />
Editing the first wo cases is also easy:
<f:form.textbox property="country" /><br />
<f:form.textbox property="firstInfusion.firstInfDate" /><br />
But I don't understand how to edit the 1:n connection.
The following will create the same Source Code as above, but the Values
are not loaded. So two new Childs are created:
<f:form.textbox property="diagnosis.0.diagnosisName" /><br />
<f:form.textbox property="diagnosis.1.diagnosisName" /><br />
In a loop I can give out the correct diagnoses but also do not get the
values already given.
<f:for each="{patient.diagnosis}" as="oneDiagnosis">
{oneDiagnosis.diagnosisName}
<f:form.textbox property="oneDiagnosis.diagnosisName" />
</f:for>
I'm now looking for the right way to approach this
Thanks a lot fo any hint!
christian (oe)
More information about the TYPO3-project-typo3v4mvc
mailing list