Hello Tim,

The index() function requires a special dependencies processing which was not fully implemented when initializing a repeat.

Please try again with rev. 613 which has now been committed.

Thanks!

--Alain

Le 13/04/2015 07:59, Tim Thompson a écrit :
Hello,

I am running into an issue with repeat indexes when instance data has been replaced by a submission (running XSLTForms 609 in eXist 2.2).

I send a query to the database:

<xf:inputid="query"ref="instance('search')/query"incremental="true">
<xf:label>Search</xf:label>
<xf:actionev:event="xforms-value-changed">
<xf:sendsubmission="submit-search"/>
</xf:action>
</xf:input>

The submission that handles this replaces the instance data:

<xf:submissionid="submit-search"resource="/exist/restxq/query"method="get"
serialization="application/x-www-form-urlencoded"ref="instance('search')/query"
    targetref="instance('search-results')"replace="instance"/>

I then output the results to a table:

<tableid="results-table">
<thead>
<th>Field</th>
<th>Value</th>
</thead>
<tbody>
<xf:repeatnodeset="instance('search-results')/*"id="search-results-repeat">
<tr>
<td>
<xf:outputvalue="substring-after(name(.), ':')"></xf:output>
</td>
<td>
<xf:outputref="."/>
</td>
</tr>
</xf:repeat>
</tbody>
</table>

I want to be able to click on a table row and set a value, based on the current index, to send back to the server:

<xf:trigger>
<xf:label>Select</xf:label>
<xf:actionev:event="DOMActivate">
<xf:setvalue ref="instance('search')/selected"value="instance('search-results')/*[position() = index('search-results-repeat')]/@rdf:about"/>
<xf:sendsubmission="select"/>
</xf:action>
</xf:trigger>

However, when I replace the instance data with my first submission, the repeat index does not reset. My question is, is it possible to rebind the data so that the repeat index becomes active again, without having to do a "@replace = 'all'" on submission?

Thank you!

Tim



------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF


_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Xsltforms-support mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to