You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Stewart, Gary" <Ga...@luht.scot.nhs.uk> on 2006/02/22 11:39:21 UTC

Duplicate Results on CForms Repeat Bind

Hi there,

I've trying to bind a form to an XML document for both loading and saving and it works ok loading a document (including the one initial repeat item) but if you create more items in the repeat and use on-insert-row insert-node to create the XML I get the extra result plus a repeat of the initial node so something like:

<Identifiers>

  <Identifier>
   <Value>0123456789</Value> 
   <Type>Test</Type> 
  </Identifier>

  <Identifier>
  <Value>0123456789</Value> 
  <Type>Test</Type> 
  </Identifier>

  <Identifier>
   <Value>123456789A</Value> 
   <Type>Diff</Type> 
  </Identifier>

</Identifiers>

Do you know any reason why the repeat nodes might be occurring? I've looked at the form2 example (which has a good example of repeats and binding) and I noticed that a unique id for each row is generated (though it isn't declared unique in any way as far as I can see) I also noticed that it includes row-state="new" though again this doesn't seem to do anything in particular. 

I'm a bit stuck as to what I might be doing wrong and any pointers would be appreciated.

Thanks,

Gary


*****************************************************************
The information contained in this message may be confidential or 
legally privileged and is intended for the addressee only, If you 
have received this message in error or there are any problems, 
please notify the originator immediately. The unauthorised use, 
disclosure, copying or alteration of this message is 
strictly forbidden.
*****************************************************************


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