Closed Bug 330825 Opened 19 years ago Closed 19 years ago

select1 doesn't suppress value changed event sequence when incremental != true

Categories

(Core Graveyard :: XForms, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspeiche, Assigned: sspeiche)

References

Details

(Keywords: fixed1.8.0.4, fixed1.8.1)

Attachments

(2 files, 2 obsolete files)

User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.55 [en] (IBM EVV/3.8/EAK01AGF/LE) Build Identifier: 1.0 Test suite case 4.6.3.b When incremental != true the value changed events shouldn't be dispatched. Also, the logic is backwards for the default for incremental (for both select and select1). 'incremental' should be treated as false, unless explicitly set to true or not present. Reproducible: Always Steps to Reproduce: 1. Load supplied test cases and observer results I have a patch for this already, will attach after a little more testing/work.
Attached file test case that shows incremental = junk (obsolete) (deleted) —
> Also, the logic is backwards for the default for incremental (for both select > and select1). > 'incremental' should be treated as false, unless explicitly set to true or not > present. Why this way? Why not treating it false only if it is really 'false'. Otherwise 'true', since it is the default value.
(In reply to comment #3) > Why this way? Why not treating it false only if it is really 'false'. Otherwise > 'true', since it is the default value. > http://www.w3.org/TR/2006/REC-xforms-20060314/slice4.html#sequence-for-select says (2nd bullet): "the form control does not have the incremental="true" setting" therefore, if not explicity set to "true" (or not set at all), it should only do: 4.6.6 Sequence: Selection Without Value Change Actually, I can't find anywhere in the spec that says incremental = 'true' is the default. If I read the 2nd bullet literally, then the default is 'false'.
http://www.w3.org/TR/xforms/slice8.html#ui-selectOne "incremental When true, this form control will generate additional xforms-value-changed events. The default for this form control is true."
Also in the schema: <xsd:attribute name="incremental" type="xsd:boolean" use="optional" default="true"/>
Assignee: aaronr → sspeiche
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 215409 [details] test case that shows incremental = junk since the type is really, xsd:boolean this is invalid. section 4.6.3 was not clear on that but section 8 is very clear
Attachment #215409 - Attachment is obsolete: true
It also appears that the event sequencing is wrong for select1. Should be 'Selection without value change' followed by 'Value change', the 'value change' is happening first. Will attempt to fix both.
Opened bug 332242 for the sequence for select/deselect events before value change
Attachment #216757 - Flags: review?(allan)
Attachment #216757 - Flags: review?(doronr)
Comment on attachment 216757 [details] [diff] [review] patch, only handles incremental='false'..not sequence of events looks good, I'll let allan deal with the spec concerns if any are left.
Attachment #216757 - Flags: review?(doronr) → review+
Comment on attachment 216757 [details] [diff] [review] patch, only handles incremental='false'..not sequence of events >Index: resources/content/select1.xml >=================================================================== >+ <property name="incremental"> As this is a readonly property, please use readonly="true". >+ <getter> >+ <![CDATA[ >+ // default is true >+ var incremental = true; >+ >+ if (this.hasAttribute("incremental")) { >+ if (this.getAttribute("incremental") == "false") >+ incremental = false; >+ } >+ >+ return incremental; No need to check for the attribute presence first, the get() call will return the empty string if the attribute is not there. So the entire function is just: return this.getAttribute("incremental") != "false"; With that fixed, r=me
Attachment #216757 - Flags: review?(allan) → review+
Attachment #216757 - Attachment is obsolete: true
Blocks: 322255
checked in to trunk for sspecihe
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Blocks: 332853
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: