Hello Tim,
I have tested xf:message within a subform and it works for me:
main form:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Main Form</title>
<xforms:model>
<xforms:instance>
<data xmlns=""/>
</xforms:instance>
</xforms:model>
</head>
<body>
<xforms:trigger>
<xforms:label>Main Form</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:message>DOMActivate in Main Form</xforms:message>
<xforms:load targetid="subform"
resource="message-subform.xhtml"/>
</xforms:action>
</xforms:trigger>
<xforms:group id="subform"/>
</body>
</html>
subform:
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Subform</title>
<xforms:model>
<xforms:instance>
<data xmlns=""/>
</xforms:instance>
</xforms:model>
</head>
<body>
<xforms:trigger>
<xforms:label>Subform</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:message>DOMActivate in Subform</xforms:message>
<xforms:unload targetid="subform"/>
</xforms:action>
</xforms:trigger>
</body>
</html>
Could you please send me a minimal test case for this issue?
Thanks!
--Alain
Le 13/04/2015 16:49, Tim Thompson a écrit :
Hello,
An additional question: I have started using subforms and noticed that
my <xf:message> elements are now no longer being alerted. I can see
that they are output to the DOM (inspecting with Firebug), but the
alert notification does not appear. I've tried declaring the messages
in the subform as well, but that didn't work. I'm sure I'm missing
something here, but don't know what.
Thank you,
Tim
On Mon, Apr 13, 2015 at 1:59 AM, Tim Thompson <[email protected]
<mailto:[email protected]>> wrote:
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