W3C home > Mailing lists > Public > public-xformsusers@w3.org > November 2016

Re: References to Elements within a repeat Element

From: Erik Bruchez <ebruchez@orbeon.com>
Date: Wed, 16 Nov 2016 11:33:58 -0800
Message-ID: <CAAc0PEUfh1RyJ3T-MnFSLOjtgM82Pfg2z7Bw1+qy=EX823Riog@mail.gmail.com>
To: Steven Pemberton <steven.pemberton@cwi.nl>
Cc: "public-xformsusers@w3.org" <public-xformsusers@w3.org>
No, it doesn't have the same effect, but It could probably be formulated in
a clearer way.

The general idea could be formulated as: "look for the closest element from
the source element", where "closest" means:

- as much as possible in the same branch of the repeat as the source element
- and, when that is not possible, then follow the repeat indexes

Some of this is independent of repeat indexes. Say you have:

    <xf:repeat ref="item">
        <xf:input ref="in">
            <xf:focus
                ev:event="xforms-value-changed"
                control="my-textarea"/>
        </xf:input>
        <xf:textarea ref="text" id="my-textarea"/>
    </xf:repeat>

The idea behind this is that if the value of the input changes, focus is
set to the `<xf:textarea>` (I realize this might not be good UI). But this
must be the text area which is closest from the `<xf:input>`, whether it is
in the repeat iteration corresponding to the current repeat index or not.
The algorithm described enables this.

-Erik

On Mon, Nov 14, 2016 at 12:44 AM, Steven Pemberton <steven.pemberton@cwi.nl>
wrote:

>
> https://www.w3.org/community/xformsusers/wiki/XForms_2.0#Ref
> erences_to_Elements_within_a_repeat_Element
>
> I find this section *really* hard to understand.
>
> Isn't it easier to say that within a <repeat> IDREFs are activated and
> deactivated as a response to changes in the repeat index, (in a similar way
> to how event handlers are activated and deactivated in response to
> relevance)?
>
> Doesn't that have the same effect?
>
> Steven
>
>
Received on Wednesday, 16 November 2016 19:34:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 16 November 2016 19:34:52 UTC