[TYPO3-mvc] Editing 1:n connections - Fluid forms
christian oettinger
christian.oettinger at gmx.de
Sat Oct 23 20:37:48 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 two 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 />
The follwing loop is run, gives out the connected diagnoses - but also
does not get the values in the Form fields.
<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