Dynamic alerts issue (Managing Validation Error Messages)

Could 'value' attribute be added for the alert element (like the one for the
output element), if better solution ('if' xpath boolean attribute, dependence
on particular constraint) is not possible?

Problem 1. I want to hide alert messages before user presses the submit button
(there is already 'required' indicator on the screen).

Problem 2. Also, I would like to show different messages for example, when data
is not entered / is entered invalid / too short / too long / ... .

It seems that these problems are not addressed properly in XForms 1.1 working
draft.

Is there a reason why 'output' element is so favored by having 'value'
attribute?

I've digged the archives and found this in 2002 thread called 'Managing
Validation Error Messages':
> Indeed, it seems the most important
> customer questions I have received
> about XForms in recent months is "When
> will it become a recommendation?" not
> "Can I have multiple validation
> messages associated w/ a single node?"

By now, XForms are actually used by some (at least, me) in a production
environment. Is there any progress on this issue since then?

I've figured out that for the problem 1 there is a solution of having a helper
instance (storing boolean submitted) and adding a check on it to 'relevant' and
'constraint' attributes, not a very good solution, since it obscures the real
meaning of these.

Another solution for problems 1 and 2 is to have one more helper instance with
an element for each alert, then bind with 'calculate' attribute for each one,
then alerts referring to these. Very bloated and also duplicating constraints
and putting all in one expression.

I've implemented proprietary solution for this, I also remember seeing that
Orbeon has a proprietary solution, and reading that another participant of 
this mailing list have implemented proprietary solution, too. There should be
more out there...

Is there a better solution or will there be one in 1.1?

Guntis

Received on Tuesday, 13 February 2007 04:44:01 UTC