RE: XML Events Question

Hello,

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.

Thanks,

.micah


-----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:
 
<trigger>
  <label>Click me</label>
  <action ev:event="xforms-activate">
    <reset model="thismodel"/>
    <setvalue ref="."/>
  </action>
</trigger>
 
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
 
mc
 
 

Received on Tuesday, 24 September 2002 19:27:48 UTC