W3C home > Mailing lists > Public > www-forms@w3.org > October 2002

RE: readonly and setvalue

From: Tomayko, Ryan <Ryan_Tomayko@stercomm.com>
Date: Tue, 8 Oct 2002 08:49:19 -0400
Message-ID: <D037B3982A54D611BA5E0006293835400132F19B@scidubmsg02.amr.stercomm.com>
To: www-forms@w3.org

> If readonly is meant for display only 
> then it should have been a CSS property 
> or a hint on the UIcontrol (not as a 
> Model Item property)

My feelings on this are somewhat mixed. First, all model item properties
describe the data layer so as to drive the presentation layer. This is a bit
different from say XML Schema, which cares only for the data layer; and is
also a bit different from CSS, which cares only for the presentation layer.
The XForms model provides a weird kind of middle ground between these two
extremes where rules are applied to the data layer but are really meant to
restrict user interaction at the presentation layer. The result is data
driven presentation and it works... most of the time.

First, making readonly a CSS attribute means that it can no longer be
dynamic. In cases where you would want simply to mark a field as readonly
all the time (as in my example), the CSS technique works. But what if I want
a control's readonlyness to be driven by some other data in the instance
document? CSS cannot do that for me. Also, what about non HTML languages
such as WML or SVG? I'm sure each of these also has a UI specific method of
marking a control read only but now I'm describing how form interaction
should occur at the presentation layer.

Second, using CSS or ui hints moves interaction rules into the presentation
layer, removing some potential for reuse. I haven't had large support on
this topic but I think huge value comes from being able to share an XForms
Model between multiple host languages. For instance, I can mark a node as
readonly once in a model and use that model in 10 different host languages
and the field should automatically be readonly in each without having to do
any host specific coding. This emphasizes the value of annotating
interaction rules at the data layer.

I think what I'm saying is that I don't think readonly is purely
presentation or purely data oriented. It is describing rules for
*interaction* and I don't think interaction fits cleanly into one layer or
the other. It sits in between. When you mark a control as readonly, you are
making two statements:

1. *Display* this control in a way that a user will know that they are not
able to interact with it. (grayed, etc.)

2. Do not allow user modification of data in this node.

If readonly was only meant to convey how a control is presented or how a
node is protected, it could be moved to CSS or Schema, respectively. But I
think readonly (along with the rest of the model item properties [except
maybe calculate]) are specifying how a user can interact with data, which is
really outside of the scope of CSS or Schema alone.

- Ryan

-----Original Message-----
From: bhanu [mailto:bhanu_k@hotmail.com] 
Sent: Monday, October 07, 2002 3:35 PM
To: 'Mikko Honkala'; Tomayko, Ryan
Cc: 'Jérôme Nègre'; 'Micah Dubinko'; www-forms@w3.org
Subject: RE: readonly and setvalue

If readonly is meant for display only then it should have been a CSS
property or a hint on the UIcontrol (not as a Model Item property)

Also all examples being quoted use the fact than all calculated nodes
are displayed as readonly.


-----Original Message-----
From: Mikko Honkala [mailto:honkkis@tml.hut.fi] 
Sent: Monday, October 07, 2002 1:42 AM
To: Tomayko, Ryan
Cc: Jérôme Nègre; Micah Dubinko; 'bhanu'; www-forms@w3.org
Subject: Re: readonly and setvalue

Hi Tomayko,

very good point. I have implemented "readonly" similarly. I have also 
made demos with similar functionality as you describe.

In my opinion, this is so important feature that the spec should not 
retrict the processor to change values marked "readonly". "readonly" 
should affect just the UI. It seems that at least 3 implementors have 
implemented it that way for a reason.


Tomayko, Ryan wrote:
> Another example of why you would want readonly only to apply to the UI
> calculating values. For instance, you my want to display a list of
> line items and allow the user to input the quantity and unit price for
> The line total would be readonly and calculated based on the quantity
* unit
> price.
> - Ryan Tomayko
> -----Original Message-----
> From: Jérôme Nègre [mailto:jerome.negre@e-xmlmedia.fr] 
> Sent: Monday, October 07, 2002 3:07 AM
> To: Micah Dubinko
> Cc: 'bhanu'; www-forms@w3.org
> Subject: Re: readonly and setvalue
> Hi,
>>Good question! Does 'readonly' mean readonly-to-user, or
>>Implementers, how did you handle this?
> Here, for XFE, we chose readonly-to-user. That way, one can have a 
> select or a range showing data without the possibility for the user to

> change it.
> Regards,
> Jérôme
Received on Tuesday, 8 October 2002 08:49:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:07 UTC