Reputation: 3
I have in a Object (dailysale) multiple nested elements (cashpoints) which contain again nested elements
dailysale -> cashpoints -> sales
-> diffkinds -> sales
...
(where "cashpoint" holds the name and "sales" holds the actual in and out, diffkinds holds some additional which have sales too ) now I want to create a input/edit-form In the partial to edit the dailysafe I've a loop:
{cashpoint.uid}<br>
<f:form.textfield property="cashpoints.{cashpoint.uid}.was" value="{cashpoint.name}" /><br />
<f:form.hidden property="cashpoints.{cashpoint.uid}.__identity" value="{cashpoint.uid}"/>
<f:form.textfield property="cashpoints.{cashpoint.uid}.einnahme" value="{dailysale.cashpoints[cashpoint.uid][einnahme]}" /><br />
<f:debug title="cashpointdebug1">{cashpoint}</f:debug>
<f:debug title="cashpointdebug2">{tagesumsatz.cashpoints[cashpoint.uid]}</f:debug>
<f:form.textfield property="cashpoints.{cashpoint.uid}.ausgabe" value="{cashpoint.ausgabe}"/><br />
updating the name of the different cashpoints works, but I don'nt get any access to the nested sales. cashpointdebug1 gives me the actual cashpoint and as nested the sale, but if I want to access cashpoint.sales or cashpoint.sales.input (a property) I get null.
What did I miss to access the nested object sales in the loop?
Upvotes: 0
Views: 1440
Reputation: 7036
Although I dont see any loop in your code, I assume you're looping through {tagesumsatz.cashpoints}
. You need another loop to access the deeper nested objects.
<f:for each="{tagesumsatz.cashpoints}" as="cashpoint">
<f:for each="{cashpoint.sales}" as="sale" >
Here you can access each {sale.input} ...
</f:for>
</f:for>
Upvotes: 1