You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Nicolas Duroc <ni...@gmail.com> on 2006/06/19 12:50:03 UTC

Access to differents repeaterLoop.index

Hi,

I use repeaters in a form to display and edit data from a XML File. The
repeaters allow to explore the XML Tree and display input for each of its
element. The differents inputs bind the XML File, and so each input is
binded to a XML node. I would like to switch up and switch down rows of the
form, and that be kept for the XML File record.
I saw ajax samples which do this, but I don't think that the record
action keeps the order of the "switched" rows because of the "id" input
binding.

I try to use javascript for my "row switching", I would have access to the
differents repeaterLoop.index.

XML Structure :
<a>
   <b id=id1>
            <c>datac-1</c>
            <d>datad-1</d>
           <e>datae-1</e>
    </b>
    <b id=id2>
            <c>datac-2</c>
            <d>datad-2</d>
           <e>datae-2</e>
    </b>
    <b id=id3>
            <c>datac-3</c>
            <d>datad-3</d>
           <e>datae-3</e>
    </b>
</a>

for this XML Structure, I would use 2 "imbricated" repeaters, one
(repeater1) would browse the "b" nodes, and in this repeater, I would use a
second repeater (repeater2) which browse c, d and e nodes.
How to differentiate the repeater1Loop.index fo the repeater2Loop.index ? Is
that possible ?

Thanks in advance

Regards,

Nicolas Duroc