<xh:html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events">
<xh:head>
<xh:title>orbeon-2018-1-last-index-issue</xh:title>
<xf:model id="repro">
<xf:instance id="test1">
<tests>
<test>1</test>
<test>2</test>
</tests>
</xf:instance>
<xf:instance id="test2">
<tests>
<test>1</test>
<test>2</test>
<test>3</test>
<test>4</test>
</tests>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xh:h3>TEST</xh:h3>
<xf:trigger appearance="compact">
<xf:label>Refresh</xf:label>
<xf:insert ev:event="DOMActivate" nodeset="instance('test1')" origin="instance('test2')"/>
</xf:trigger>
<xh:table bgcolor="white">
<xf:repeat nodeset="instance('test1')/test" id="test-table">
<xh:tr>
<xh:td><xf:output ref="."/></xh:td>
</xh:tr>
</xf:repeat>
</xh:table>
</xh:body>
</xh:html>
You received this message because you are subscribed to a topic in the Google Groups "Orbeon Forms" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/orbeon/YWM7tURmS8s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to orbeon+un...@googlegroups.com.
1. This is new behavior for Orbeon 2018.1 right? It wasn't doing this in Orbeon 2017.2.2
2. We almost always refresh full instances through submissions. After xforms-submit-done we 'manually' set the index to what we want it to be and then leave it up to xxforms-index-changed to follow selections in the repeat.
<xh:html xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xh="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events">
<xh:head>
<xh:title>orbeon-2018-1-last-index-issue</xh:title>
<xf:model id="repro">
<xf:instance id="test1">
<tests>
<test>1</test>
<test>2</test>
</tests>
</xf:instance>
<xf:instance id="test2">
<tests>
<test>1</test>
<test>2</test>
<test>3</test>
<test>4</test>
</tests>
</xf:instance>
</xf:model>
</xh:head>
<xh:body>
<xh:h3>TEST</xh:h3>
<xf:trigger appearance="compact">
<xf:label>Refresh</xf:label>
<xf:action ev:event="DOMActivate">
<xf:insert nodeset="instance('test1')" origin="instance('test2')"/>
<xf:message>Set index 1</xf:message>
<xf:setvalue ref="index('test-table')" value="1"/>
</xf:action>
</xf:trigger>
<xh:table style="background-color: white; border: 1px solid black;">
<xf:repeat nodeset="instance('test1')/test" id="test-table">
<xh:tr>
<xh:td style="padding: 1em;"><xf:output ref="."/>  - List item</xh:td>
</xh:tr>
<xf:action ev:event="xxforms-nodeset-changed">
<xf:message>nodeset change.  <xf:output ref="index('test-table')"/></xf:message>
</xf:action>
<xf:action ev:event="xxforms-index-changed">
<xf:message>index change.  <xf:output ref="index('test-table')"/></xf:message>
</xf:action>