Hi,
I finally have my repeater working, but now something odd happens: I loose
the value of the widget that is defined as identity, which results in all
existing rows being added as "new". I suppose I'm doing something wrong, but
I cannot figure out what.
And it gets wierder by the minute:
When debugging I can see that the identity widgets are filled in correctly,
but after submit they are empty and thus every row is considered to be new
and is then added.
However, if I display the widget holding the identity the identity is
retained and only newly added rows are added. In other words, the repeater
behaves as expected.
But, if I display the identity widget with styling="output" the identities
get lost again.
What's wrong?
<fd:repeater id="appointments">
<fd:widgets>
<fd:field id="ID">
<fd:label>ID</fd:label>
<fd:datatype base="string"/>
</fd:field>
<fd:field id="appointmentDate">
<fd:label>Datum</fd:label>
<fd:datatype base="date"/>
</fd:field>
<fd:field id="appointmentTime">
<fd:label>Tijd</fd:label>
<fd:datatype base="date"/>
</fd:field>
<fd:field id="appointmentPerson">
<fd:label>Naam</fd:label>
<fd:datatype base="string"/>
</fd:field>
</fd:widgets>
</fd:repeater>
<fd:repeater-action id="addAppointment"
action-command="add-row" repeater="appointments">
<fd:label>Voeg afspraak toe</fd:label>
</fd:repeater-action>
</fd:widgets>
<fb:repeater id="appointments" parent-path="."
row-path="lists/appointments">
<fb:identity>
<fb:value id="ID" path="id"/>
</fb:identity>
<fb:on-bind>
<!-- executed on updates AND right after the insert -->
<fb:custom id="appointmentDate" path="date" class="mycustombinding"/>
<fb:custom id="appointmentTime" path="time" class="mycustombinding"/>
<fb:custom id="appointmentPerson" path="person"
class="mycustombinding"/>
</fb:on-bind>
<fb:on-delete-row>
<fb:delete-node/>
</fb:on-delete-row>
<fb:on-insert-row>
<fb:insert-bean
classname="mybean"
addmethod="add" />
</fb:on-insert-row>
</fb:repeater>
Thanks.
Bye, Helma
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]