W3C home > Mailing lists > Public > www-forms@w3.org > June 2006

RE: How best to do a once only calculation?

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Tue, 6 Jun 2006 20:11:38 +0100
To: <www-forms@w3.org>
Message-ID: <039c01c6899d$09444e20$6502a8c0@Jan>


> You can for example add an even listener to your model that 
> listens for the modelconstruct-done event and use a set value 
> action to set the value.
> <xforms:setvalue bind="Date_begun" value="now()" 
> ev:event="xforms-model-construct-done"/>

But Adam's question was that he didn't want the date to be repeatedly
overwritten every time he reloaded the form. That's why I likened it to a
'default' value, since they are usually used to give an empty form control a

Of course, if using a processor that supports the conditional tests from
XForms 1.1 then you could do what you suggest, but test for 'empty' first.



Mark Birbeck
x-port.net Ltd.

e: Mark.Birbeck@x-port.net
t: +44 (0) 20 7689 9232
b: http://internet-apps.blogspot.com/
w: http://www.formsPlayer.com/

Download our XForms processor from
Received on Tuesday, 6 June 2006 19:12:00 UTC

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