You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Remmerie Bart <Ba...@elia.be> on 2005/01/25 10:38:06 UTC

[CForms] repeaters, identity & guids

Dear all,

I have been using repeaters & bean-binding in the past, so I think I can
pretend to know the basic principles, but the following problem seems to
exceed my knowledge:

I have a basic form with a basic repeater, linked to a basic beanList.
Each bean in the list contains 3 fields (id (string), title (string) &
status (string))
The id-field is a unique identifier (uuid-hex <= generated by Hibernate)

When I set up the binding as follows:

<fb:repeater id="myList" parent-path="." row-path="beanList">
      <fb:identitity>
        <fb:value id="identifier" path="id" />
      </fb:identitity>
      <fb:on-bind>
        <fb:value id="myTitle" path="title"/>
        <fb:value id="status" path="status"/>
      </fb:on-bind>
      <fb:on-delete-row>
        <fb:delete-node/>
      </fb:on-delete-row>
      <fb:on-insert-row>
        <fb:insert-bean classname="myTest.myBeanList"
        				addmethod="addBean"/>
      </fb:on-insert-row>
</fb:repeater>

The value of the id is never present in the generated html (I tried using
fd:field/fd:output/...)

BUT, when I put <fb:value id="identifier" path="id" />
in the <fb:on-bind> part, the id-value is visible in the generated html

In both cases I have a problem when deleting a row (row-action) => the rows
are not identified & the number of rows get doubled.

I'm pretty sure that I only need to solve the identity problem to get the
delete-row problem fixed, but I've been breaking my brains over this
(probably very simple) problem for 2 days now.

Anyone can help ??
I've tried to apply the information found in the 'losing identity values in
repeater'-thread without success

Thanks,
Bart





This message and its attachments may contain confidential information protected by intellectual property rights or other rights & is strictly for the exclusive use of the intended recipient. It is strictly prohibited to copy, alter or disclose this message or its contents to any other person without Elia's prior consent. If you are not the intended recipient of this message, please inform the person who sent it and delete the message from your system. Elia is not liable for any direct or indirect damage arising from errors, inaccuracies or any loss in the message, from unauthorized use, disclosure, copying or alteration of it or as a result of any virus being passed on. This message does not constitute any commitment from Elia except when expressly otherwise agreed between the intended recipient and Elia.

U vindt de Nederlandse versie van deze disclaimer op onze internetsite  www.elia.be

Vous pouvez découvrir la version française de ce disclaimer sur notre site internet www.elia.be


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org