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

Proposal to add '@cancelable' to xf:message [was RE: yes/no confirmation.]

From: Mark Birbeck <mark.birbeck@x-port.net>
Date: Wed, 22 Jun 2005 17:03:17 +0100
Message-ID: <CA3CE0DB-CB58-4CBE-80A3-3E45ABCB06EF@S009>
To: <ava@vaz.ru>
Cc: <www-forms@w3.org>, <w3c-forms@w3.org>

Hi Alex,

> What is the simplest way to make yes/no confirmation (like 
> prompt in JS) on XForms before some action (send or smth.)? 
> It seems too complex with modal xf:message...

This is not currently possible in XForms in an easy way. It's a good
candidate for a feature request though. Are you looking to use a xf:message
to pick up *any* values, or is the main use-case to ask a user whether they
want to proceed with a task?

One way of doing the first type of operation might be to add the ability to
do conditional event handling to XML Events (this has been discussed in the
context of XHTML 2):

  <action ev:event="DOMActivate">
    <message level="modal">
      <!-- some controls in here that gets a value -->
    </message>
    <send ev:cond="x = true()" submission="s" />
  </action>

However, if we just need the confirm/cancel feature then perhaps an
attribute added to xf:message to indicate that you are going to let the user
cancel the whole handler might be enough. Event handlers are often
cancellable anyway, so all we are doing here is saying that the user can
choose to cancel it. (We could even make it an XPath expression, so that it
is sometimes cancellable, and sometimes not):

  <action ev:event="DOMActivate">
    <message level="modal" cancellable="true()">
      Are you sure you want to send?
    </message>
    <send submission="s" />
  </action>

This would be pretty easy for implementations to add to message, I would
think.

Regards,

Mark


Mark Birbeck
CEO
x-port.net Ltd.

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

Download our XForms processor from
http://www.formsPlayer.com/
Received on Wednesday, 22 June 2005 16:03:56 GMT

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