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:input id="query" ref="instance('search')/query" incremental="true">
    <xf:label>Search</xf:label>
    <xf:action ev:event="xforms-value-changed">
        <xf:send submission="submit-search"/>
    </xf:action>
</xf:input>

The submission that handles this replaces the instance data:

<xf:submission id="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:

<table id="results-table">
    <thead>
        <th>Field</th>
        <th>Value</th>
    </thead>
    <tbody>
        <xf:repeat nodeset="instance('search-results')/*" id=
"search-results-repeat">
            <tr>
                <td>
                    <xf:output value="substring-after(name(.), ':')"
></xf:output>
                </td>
                <td>
                    <xf:output ref="."/>
                </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:action ev:event="DOMActivate">
        <xf:setvalue ref="instance('search')/selected"
value="instance('search-results')/*[position()
= index('search-results-repeat')]/@rdf:about"/>
        <xf:send submission="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

Reply via email to