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

Re: 12.2.1 References to Elements within a repeat Element

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Fri, 29 Jun 2018 11:01:56 +0200
To: "public-xformsusers@w3.org" <public-xformsusers@w3.org>, "Nick Van den Bleeken" <Nick.Van.den.Bleeken@inventivegroup.com>
Message-ID: <op.zlc4pif7smjzpq@steven-xps>
On Thu, 28 Jun 2018 15:32:42 +0200, Nick Van den Bleeken  
<Nick.Van.den.Bleeken@inventivegroup.com> wrote:

> Hi Steven,

Hey Nick! Great to hear from you, and glad you're still reading the list.

> 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.
> Example:
> <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:trigger>
>                   <xf:dispatch ev:event="DOMActivate" name="  
> my-custom-event " targetid="c-1" delay="5000"/>
> 	</xf:trigger>
>     </xf:repeat>
> </xf:repeat>
> 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.

OK, well that sounds like we need to tweak the definition of <dispatch/>  
with a delay. But that would then fix it surely?

The current text is long and convoluted (and I'm not convinced it covers  
everything, partly because of its length).


> 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...
> Best,
> Nick
> ´╗┐On 28/06/2018, 14:05, "Steven Pemberton" <steven.pemberton@cwi.nl>  
> wrote:
>    https://www.w3.org/community/xformsusers/wiki/XForms_2.0#References_to_Elements_within_a_repeat_Element
>    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
>     identified."
>    Am I missing anything?
>    Steven
Received on Friday, 29 June 2018 09:02:23 UTC

This archive was generated by hypermail 2.3.1 : Friday, 29 June 2018 09:02:24 UTC