W3C home > Mailing lists > Public > public-xformsusers@w3.org > June 2018

Re: 12.2.1 References to Elements within a repeat Element

From: Nick Van den Bleeken <Nick.Van.den.Bleeken@inventivegroup.com>
Date: Thu, 28 Jun 2018 13:32:42 +0000
To: Steven Pemberton <steven.pemberton@cwi.nl>, "public-xformsusers@w3.org" <public-xformsusers@w3.org>
Message-ID: <B7297E3D-881D-4B70-A217-DBA06CEB273E@inventivegroup.com>
Hi Steven,

It's been a long time, and I wasn't present in the discussion, if there was one, and I might be mis interpreting your text and/or the original text. Enough disclaimer ;)

Isn't there a difference between your text and the original text? In the original text the IDREF is resolved relative to the current 'runtime' iteration of the repeat the element resides in for repeats that are in common AND the current repeat index (for example set with setindex-action. In your text only the current repeat-index is used.

I can only think of one use-case where the current repeat index is different from the current 'runtime' iteration of the repeat, and that is if you have a delay on a dispatch action.


<xf:repeat ref="entry" id="outer">
    <xf:repeat ref="sub-entry" id="inner">
	<xf:input ref="field1" id="i-1">...</input>
	<xf:setvalue ref="field1" value="'foo'" ev:event="my-custom-event" id="c-1"/>
                  <xf:dispatch ev:event="DOMActivate" name=" my-custom-event " targetid="c-1" delay="5000"/>

When you have multiple entries and or sub-entries AND after you activate the trigger you give focuds to an input field of a different iteration, the value of the incorrect repeat iteration will be set.

I know that it is a contrived example, but I guess you can have this scenario also in real-life use cases. But my XForms knowledge is getting a bit rusty...



´╗┐On 28/06/2018, 14:05, "Steven Pemberton" <steven.pemberton@cwi.nl> wrote:


    I was trying to simplify the language in this section to try and make it  
    easier to read, and I can't find any case that isn't covered by the text:
    "The target object is identified by the current values of the repeat  
    indexes of the enclosing repeats. If any index is zero, no object is  
    Am I missing anything?

Received on Thursday, 28 June 2018 13:33:11 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 28 June 2018 13:33:12 UTC