W3C home > Mailing lists > Public > www-forms@w3.org > February 2007

Re: Ordering of listeners at the current node

From: Ulrich Nicolas Lissé <unlisse@googlemail.com>
Date: Thu, 8 Feb 2007 17:16:09 +0100
Message-ID: <da289f40702080816x3231e8b5xf2d9463f3f422c49@mail.gmail.com>
To: mark.birbeck@x-port.net
Cc: www-forms@w3.org, CLARKJ2@ccf.org

John, Mark,

while Mark is right about DOM 2 Events, you may achieve ordered event
handler execution with xf:action: "This action causes its child
actions to be invoked in the order that they are specified in the
document." [1]

So you could write

<xf:action ev:event="some-event" ev:observer="foo">
    <xf:message>Hello</xf:message>
    <!-- ... -->
    <xf:message>World</xf:message>
</xf:action>

Regards,
Uli.

[1] http://www.w3.org/TR/xforms/slice10.html#action-action

On 2/8/07, Mark Birbeck <mark.birbeck@x-port.net> wrote:
>
> Hi John,
>
> > I apologize in advance if this is more of an XML Events question than an
> > XForms question, but I wasn't sure in which spec my question might be
> > answered.
>
> It's actually a DOM 2 Events question. :)
>
> > If you have multiple listeners listening for a particular event at a
> > node, what (if anything) determines the order in which these listeners
> > will be dispatched when the event reaches the node?
>
> Nothing determines the order, and you can't make any assumptions about it.
>
>
> > [...]
> >
> > or would the effect be
> > implementation-defined, and why?
>
> I'm not sure what 'implementation-defined' would mean. For example, we
> wouldn't in formsPlayer say "this is the order we use", since the
> whole point is that you can't rely on the order. If you did start
> relying on it, then your form might behave differently in another
> processor.
>
> Regards,
>
> Mark
>
> --
>   Mark Birbeck, formsPlayer
>
>   mark.birbeck@x-port.net * +44 (0) 20 7689 9232
>   www.formsPlayer.com * internet-apps.blogspot.com
>
>   standards. innovation.
>
>
Received on Thursday, 8 February 2007 16:16:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:08 GMT