Issue on Working with nested <xforms:repeat>

Posted by Somya Rajesh Agarwal on
URL: https://discuss.orbeon.com/Orbeon-Form-Builder-Form-Runner-for-a-regular-web-site-tp2552615p3003378.html

Hi all,

I need to have nested <xforms:repeat> control in my xform.

For ex. As per the below template, the form should enable the multiple 'appointments' entries. Also for each 'appointment' multiple 'prescriptions' entry is required.

        <appointment>
                <date />
                <diagnosis />
                <prescription>
                        <drug />
                        <noOfDays>
                        <dosage>
                </prescription>
        </appointment>

The outer repeat is working as expected but inner repeat on prescriptions is not working fine.

Here is the problem:
1. Suppose I have an 'appointment' node in the beginning say 'app-a'.
2. Now I add 'app-b'.
3. Both 'app-a' and 'app-b' have one 'prescription' node each by default.
4. Now, when I add a 'prescription' node or delete a 'prescription' node in 'app-a', the 'prescription' node in 'app-b' get       added/deleted.

Kindly help me resolve this problem. Please find attached the code (index5.jsp) I am using.

Would highly appreciate your help.

P.S. In the orbeon architecture I have placed the file "index5.jsp" at WebContent/xforms-jsp/<new-folder>

Thanks and Regards,
Somya


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws

index5.jsp (6K) Download Attachment