W3C home > Mailing lists > Public > www-forms@w3.org > September 2002

RE: XML Events Question

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Tue, 24 Sep 2002 16:27:45 -0700
Message-ID: <E840F0B7E6189547BDB91DA8BF2228AB28C778@csmail.cardiff.com>
To: "'duke'" <mclay@aon.at>, www-forms@w3.org


A handler is a specification to do something (without saying when to do it).
All of the elements in the "Action" chapter in XForms can be handlers.

A listener is a binding of a handler to an event targeting some element in a
document. (so it does say exactly when to do it)

In your example, <action> is both a listener and a handler.

Because of the way <action> is defined, <reset> and <setvalue> in your
example have the effect you would expect, but are not listeners or handlers
in the XML Events sense. To put it another way, the "specification to do
something" for <action> is to do the tasks, in sequence, of each of the
child elements.

If you used <reset> or <setvalue> as a direct child of the form control,
with the appropriate XML Events attributes, then they would be properly
considered listeners and handlers. XForms uses the technique described in
the XML Events specification
shown at 2.3.1. Examples of Using Attributes Attached to a Handler Element

I hope this helps.



-----Original Message-----
From: duke [mailto:mclay@aon.at]
Sent: Tuesday, September 24, 2002 12:31 PM
To: www-forms@w3.org
Subject: XML Events Question

Hi all!
I searched the web and didnt find any answer..could anybody pls. explain the
difference between
EventListener and EventHandler in context of XML Events.
XForms Example:
  <label>Click me</label>
  <action ev:event="xforms-activate">
    <reset model="thismodel"/>
    <setvalue ref="."/>
Element action is the EventListener for Events occurring on target Element
trigger but it also the default handler for this event. Is there a
difference between listener and handler?? And what is the relation between
element action  (EventListener and EventHandler for target trigger) and the
concret subactions (reset,setvalue) in terms of the XML Events spec.?? 
Many thanks
Received on Tuesday, 24 September 2002 19:27:48 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:07 UTC