- From: Erik Bruchez <ebruchez@orbeon.com>
- Date: Tue, 23 Oct 2007 19:34:53 -0700
- To: "Forms WG (new)" <public-forms@w3.org>
- Message-ID: <471EAF4D.3040101@orbeon.com>
All, I worked on a few related issues/action items: Issue 88 (http://www.w3.org/2007/09/19-forms-minutes.html#action02) Issue 89 (http://www.w3.org/2007/09/19-forms-minutes.html#action03) Issue 90 (http://www.w3.org/2007/09/19-forms-minutes.html#action01) They all touch to the same section "8.1.10 The select Element" of the spec so I am grouping the changes together. I hope I did not go too much over the bounds of the action items, but I may have done so a little bit. One complaint I had in issue 88 was that the term "storage value" was not defined. While technically I was not wrong here (no real definition starting with "Definition: ..."), "8.2.3 The value Element" does define how a storage value is computed. And I was certainly wrong in saying that "storage value" was not mentioned anywhere else: it is mentioned in particular in "8.2.2 The item Element" and "9.3.6 The itemset Element". So it seems relatively clear that a "storage value" is a value specified by xforms:item/xforms:value or xforms:itemset/xforms:value. As a side note this notion of "storage value" does not seem to apply to xforms:copy. Well, section "9.3.7 The copy Element" is quite messed up anyway as I thought I pointed out once (but I can't find the reference now). This being I think fine as is, I started working on the actual text paragraph about "closed selections". A few comments: * The text only talks about "the initial instance value". But this is incomplete, because a control does not only update based on initial instance value, but everytime there is a refresh of the UI. So I suggest changing the text "If the initial instance value" with something else, namely "when the form control is updated to reflect instance data". * Issue 89 also requires to be more precise to explain what happens in the other direction. Both areas need to cover blank values as well. * It is not clear is the text from "8.1.10 The select Element" is really meant to cover xforms:copy much. I think that what "9.3.7 The copy Element" attempts to describe would benefit from being included here instead. * The specification for free entry remains funky. I tried not to touch this. * I built on the use of "storage value" which seems to exclude xforms:copy, so handling of xforms:copy remains untouched here. If the working groups wishes so, I can attempt to make the text more xforms:copy-friendly, but I think that this would still involve modifying "9.3.7 The copy Element". Anyway I propose expanding this section to cover all this at the same time. Here is my proposal, also available in the spec-ready text attached: For closed selections: when the form control is updated to reflect bound instance data, behavior equivalent to the following steps must take place: * The space-separated values in the bound instance data are compared with the form control items' storage values. * Each form control item with a storage value equal to an instance data value becomes selected if it was not already selected. * Each form control item with a storage value missing from the instance data value becomes deselected if it was not already deselected. * If there are instance data values for which there is no corresponding form control item storage value, the form control must indicate an out-of-range condition. * NOTE: Any form control item with a storage value which is empty or which contains only white space characters must remain deselected. When the user selects a form control item which was previously deselected, behavior equivalent to the following steps must take place: * If the item's storage value was not present in the bound instance data, the item's storage value is inserted in the list of space-separated values. The exact location of the insertion is implementation-dependent. Any other item having the same storage value becomes selected as well. * If the item's storage value was already present in the bound instance data, the bound instance data is left unchanged. * NOTE: A form control item with a storage value which is empty or which contains only white space must not be selectable by the user. When the user deselects a form control item which was previously selected, behavior equivalent to the following steps must take place: * If the item's storage value was present in the bound instance data, the item's storage value is removed from the list of space-separated values. Any other item having the same storage value becomes deselected as well. * If the item's storage value was already absent from the bound instance data, the bound instance data is left unchanged. For open selections: when the form control is updated to reflect bound instance data, the behavior is the same as with closed selection, except the following: * The form control never indicates an out-of-range condition. * If there are instance data values for which there is no corresponding form control item storage value, those values are included as selected values, as if entered through free entry. Free entry text is handled the same as form control input 8.1.2 The input Element, possibly in multiplicity. When using dynamic selections with complexTypes, open selection has no effect. [TODO: What does this do here anyway?] I also suggest modifying "8.1.11 The select1 Element" with the same spirit: For closed selections: when the form control is updated to reflect bound instance data, behavior equivalent to the following steps must take place: * The bound instance data value is compared with the form control items' storage values. * The first form control item with a storage value equal to the instance data value becomes selected if it was not already selected. Other form control items with a storage value equal to the instance data value becomes deselected if they were selected. * Each form control item with a storage value different from the instance data value becomes deselected if it was not already deselected. * If no form control item storage value is equal to the instance data value, the form control must indicate an out-of-range condition. When the user selects a form control item which was previously deselected, behavior equivalent to the following steps must take place: * The bound data value is set to the selected item's storage value. * All other form control items become deselected. For open selections: when the form control is updated to reflect bound instance data, the behavior is the same as with closed selection, except the following: * The form control never indicates an out-of-range condition. * If no form control item storage value is equal to the instance data value, the selected value is that lexical value. Free entry text is handled the same as form control input 8.1.2 The input Element. Please comment. Thanks, -Erik -- Orbeon Forms - Web Forms for the Enterprise Done the Right Way http://www.orbeon.com/
Attachments
- text/xml attachment: controls.xml
Received on Wednesday, 24 October 2007 06:04:14 UTC