The general rule for XML binding consists of using the full path and attribute name. However, this may result in multiple input objects in the JSP with the same name. Input objects with the same name are posted as an array of objects and are not posted to the API.
To uniquely identify each input as part of a specific XML element, you can add a postfix that contains an underscore ("_") plus a counter after the repeating element name.
For example, the binding of each ship node field on the list of order lines should be
xml:/Order/OrderLines/OrderLine/@ShipNode
If you require a screen that contains a list of order lines with ship node editable on each line, you can use a special XML binding convention to handle this scenario.
The repeating element is OrderLine. For each ship node input object, the special postfix is added for each line. The result is two unique XML bindings: When this data is posted, all XML bindings containing the same special postfix are combined into the same XML element in the API input.
xml:/Order/OrderLines/OrderLine_1/@ShipNode
and
xml:/Order/OrderLines/OrderLine_2/@ShipNode
To make using this special postfix XML binding easier, the loopXML JSP tag provides a JSP variable that contains a unique counter for each individual loop. This JSP variable, that is available inside the loopXML JSP tag, is the ID attribute specified in the loopXML tag plus the literal Counter. For example, use the following loopXML in your JSP:
<yfc:loopXML name="Order" binding="xml:/Order/OrderLines/@OrderLine"
id="OrderLine">
This makes the OrderLineCounter JSP variable available for use inside of the input XML bindings. For example:
<input type="text" <%=yfsGetTextOptions("xml:/Order/OrderLines/OrderLine_"
+ OrderLineCounter + "/@ShipNode", "xml:/OrderLine/@ShipNode",
"xml:/OrderLine/AllowedModifications")%>/>