W3C home > Mailing lists > Public > www-forms@w3.org > October 2001

Re: Events in XForms

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Tue, 30 Oct 2001 10:45:39 +0100
Message-ID: <00d901c16127$a2f57a60$7ef5a8c0@steven>
To: <www-forms@w3.org>
From: "xavier" <xavier.gagneur@e-xmlmedia.fr>

> Hi, I also have this kind of problem. I'd like to do something like this :
>
> <xform:input bind="a">
>     <xform:caption>Title</xform:caption>
>     <xform:action event="xforms-value-changing">
>         <xform:setValue bind="a" value="abc"/>
>     </xform:action>
> </xform:input>

> So that when the user changes the value of the input, it becomes straight
away
> "abc". Unfortunately, it doesn't seem possible. Does anyone has a
work-around ?

You may have noted recently a new draft of the Events specification
(www.w3.org/TR/xml-events/)

If I understand your question properly, the answer is:

 <xform:model>
   <xform:action evt:event="xform:value-changing" evt:observer="id of the
element a binds to">
     <xform:setValue bind="a" value="abc"/>
   </xform:action>
 </xform:model>

Best wishes,

Steven Pemberton
Co-chair, W3C Forms Working Group
Received on Tuesday, 30 October 2001 04:48:08 GMT

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