W3C home > Mailing lists > Public > www-forms@w3.org > February 2007

Re: Dynamic alerts issue (Managing Validation Error Messages)

From: Guntis Ozols <guntiso@latnet.lv>
Date: Thu, 22 Feb 2007 18:26:34 +0200
Message-ID: <1172161594.45ddc43a64a88@clients.latnet.lv>
To: www-forms@w3.org

It's been suggested to me by Ulrich Nicolas that 'output' with @value is allowed
as content for 'alert'. Although not exactly what I was looking for and too
verbose, it's useful (I used Table of Contents in spec to navigate directly to
'The alert Element', and for some reason attribute info is there but content
info is not) Thanks, Uli! I'm a big fan of XForms now! XForms are very good
(but a bit verbose)!

>> I think xforms:alert should have boolean attribute, too
>> to handle 'no alerts for new records before submit' and xsd.
>Honestly, I have no idea what the above sentence means!

Sorry. I meant: connecting alerts to constraints may not be enough (no
appropriate constraint in model). For example, for edit forms of my database
application, I want to hide alerts before user presses submit button, if
instance is not in database yet. Also, there should be ability to handle
various xsd violations.

So instead of:

<alert><output value="if(instance('helper')/alertson != 'true', '',
if(normalize-space(.) = '', 'Required input, provide value', 'Constraint
violation, do this and that'))"/></alert>

I am suggesting something like (which can be further improved):

<alert if="instance('helper')/alertson = 'true' and normalize-space(.) =
''">Required input, provide value</alert>
<alert if="violated(myconstraint)">Constraint violation, do this and

Received on Thursday, 22 February 2007 16:26:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:37:55 UTC