Re: Disabling a button based on validity

Erik Bruchez wrote:

>> This extra-code is not so easy to do for me. And furthermore difficult 
>> since David Landwehr
>> show me that an event 'xforms-invalid' is dispatched when an invalid 
>> data is changed to a still invalid value.
> 
> 
> Is that what the spec says? It turns out that yes, in the proposed 
> second edition: "Dispatched in response to: an instance data node either 
> changing and *being* or becoming invalid.", plus all of "4.3.4 The 
> xforms-refresh Event".
> 
> It would be interesting to know the rationale behind resending MIP 
> events whenever the value changes, even if the properties associated 
> with the value have not changed. Somebody who knows, please?

I am re-reading the spec (proposed 1.0 2nd ed.), and I notice that under 
"4.3.4 The xforms-refresh Event", it says:

"If the xforms-value-changed event is marked for dispatching, then all 
of the appropriate model item property notification events must also be 
marked for dispatching (xforms-optional or xforms-required, 
xforms-readwrite or xforms-readonly, and xforms-enabled or 
xforms-disabled)."

The above mentions all the MIP events, except xforms-valid or 
xforms-invalid. Is this a voluntary omission? If so, it would seem to 
say that if a value changes, but the MIP doesn't change, then there is 
no need to send xforms-valid and xforms-invalid.

Quid?

-Erik

Received on Thursday, 27 October 2005 23:37:59 UTC