- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Tue, 16 Jan 2018 16:29:47 +0100
- To: "Erik Bruchez" <ebruchez@orbeon.com>
- Cc: XForms <public-xformsusers@w3.org>
The fact that two different implementations do the same thing in the same
way (contradicting the spec in the process) definitely makes this worth
discussing.
From your explanation below I understand the reasoning to be:
* We want to be able to disable triggers
* When a button is disabled in other systems, it is greyed out
* In XForms, readonly things are greyed-out
* Therefore we use readonly as the marker for disabling triggers in XForms.
However, I'm not convinced by this line of reasoning, for these reasons:
* <trigger/> and <submit/> are closely related.
* You can only submit data if it is valid, relevant, and non-empty if
required.
* You *can* submit data that is readonly.
I stumbled on this problem when I was writing code like this:
<trigger ref="value" label="Add">
<insert ref="list" origin="value" ev:event="DOMActivate"/>
</trigger>
clearly I don't want to do anything with 'value' if it is invalid, etc,
but I have to go to a lot of extra work to disable the trigger in those
cases.
Steven
On Wed, 10 Jan 2018 21:56:31 +0100, Erik Bruchez <ebruchez@orbeon.com>
wrote:
>>> - hide the trigger if non-relevant (as we do for any other control)
>>> - show but disable the trigger if it is readonly
>>
>> That is what XSLTForms does as well. I don't quite get the reasoning
>> behind
>> disabling the action on readonly though.
>
> Controls in various environments, including HTML, typically have a
> "disabled" mode, where they appear but otherwise don't work. This is
> true for input fields, dropdowns, etc. Buttons too have such a mode.
>
> When an input control is readonly it makes sense to show it as
> disabled (although there could be a subtle difference between the
> two). So by extension using `readonly` as the way to make the button
> look disabled seems a natural way given the MIPs available right now
> in XForms.
>
>>> We don't use any validity properties. If the bound node is invalid,
>>> would you show the trigger but disable its action?
>>
>>
>> Yes; also if it is required and empty.
>
> Ok.
>
> -Erik
Received on Tuesday, 16 January 2018 15:30:44 UTC