W3C home > Mailing lists > Public > www-forms@w3.org > January 2004

RE: Event Context Info

From: Shone Sadler <ssadler@qlinktech.com>
Date: Tue, 6 Jan 2004 11:09:19 -0500
Message-ID: <F0E0E3343DCD2147B6B417F850678537567BFD@apollo11.qlinktech.com>
To: "Mark Birbeck" <mark.birbeck@x-port.net>
Cc: <www-forms@w3.org>
Hi Mark,

 

Thanks for the feedback!  I kind of figured that would be the solution,
but I was hoping that I might have been overlooking something within the
XForms, XML event, and DOM events specs.  I agree with you on your
preference on using a parameter to specify the property to return and
that's how we will probably implement it within our XForms
implementation for now.  

 

Thanks again,

Shone Sadler

http://www.qlinktech.com

 

-----Original Message-----
From: Mark Birbeck [mailto:mark.birbeck@x-port.net] 
Sent: Tuesday, January 06, 2004 10:51 AM
To: Shone Sadler
Cc: www-forms@w3.org
Subject: RE: Event Context Info

 

Hi Shone,

 

There have been a few suggestions as to how to resolve this, but I think
the front-runner is probably to have an XPath function that returns the
context information. Even if that wasn't the ultimate solution, if you
were to write your own qlink:eventContext() function then it would get
you by for now, and wouldn't break with the spec, if you kept it out of
the XForms namespace.

 

One problem though, is that you need to place the context information
into an event object, not return it directly. Eventy handlers always
receive an event object, and then need to know how to get the relevant
information out of the structure. My personal preference for addressing
this is to use a parameter in the function which names the event object
property that you want to return.

 

Regards,

 

Mark

 

Mark Birbeck

CEO and CTO

x-port.net Ltd.

 

When you need 100% of

the XForms standard:

http://www.formsPlayer.com/

 

	-----Original Message-----
	From: www-forms-request@w3.org [mailto:www-forms-request@w3.org]
On Behalf Of Shone Sadler
	Sent: 06 January 2004 14:27
	To: www-forms@w3.org
	Subject: Event Context Info

	Hello everyone,

	 

	We are looking at providing a more seamless integration/mapping
of data between our XForms implementation and underlying O/R framework.
One item we need to enable this is the ability for a user (form
designer) to create event observers that listen for DOM mutation events
to do for example; set the value of a modified flag/node to true (or a
date-time) when a row in a homogenous collection is modified (so that we
can synchronize the changes back to the O/R data-source).  However, we
are having difficultly in finding a way to implement this is a non
proprietary fashion since, from what we have seen, there is no mechanism
for accessing event context information within an action or set of
actions.  For the example above, we need to know the node that was
modified (or at least its index/XPath location string with respect to a
homogenous collection) in order to use the setvalue action to set the
modified node for the corresponding row.    The XForms spec mentions
several events (xforms-submit-error, xforms-insert, xforms-delete) that
have additional contextual information (beyond target,  bubbles,
canceable, etc...).  But how can we access this information within
actions? I was hoping to see an xforms:eventContext function or similar
mechanism that would provide access to the event context data structure.
But I have not seen that yet.  Does anyone know if there are plans to
add such functionality?  Alternatively, we could use a script handler
vs. a XForms action group to accomplish the functionality.  However, in
the XML Events spec we saw no mechanism for accessing the event context
info either, such as an implicit event object made available in the
scripting environment.

	 

	Any insights appreciated!

	 

	Thanks,

	Shone Sadler

	http://www.qlinktech.com

	 

	 
Received on Tuesday, 6 January 2004 11:09:49 GMT

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