Changes between Initial Version and Version 1 of Ticket #11215


Ignore:
Timestamp:
Jul 4, 2010, 11:36:39 PM (9 years ago)
Author:
bill
Comment:

That is weird, I'm not sure why the code is casting to a string or why it's doing the triple === instead of the double ==.

Hmm, looks like there are no automated tests for MultiSelect at all :-(, so I'd like to have those before changing the code.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #11215

    • Property Milestone changed from tbd to 1.7
  • Ticket #11215 – Description

    initial v1  
    1 This problem is in the code for dijit.form._FormSelectWidget, but I found it using dojox.form.CheckedMutliSelect.
     1This problem is in the code for dijit.form._FormSelectWidget, but I found it using dojox.form.!CheckedMutliSelect.
    22
    3 When you have dojox.form.CheckedMultiSelect attached to a datastore that returns integer values which become the value field for the multiselect's options, it becomes impossible to set the value for the checked multiselect. Here's why:
     3When you have dojox.form.!CheckedMultiSelect attached to a datastore that returns integer values which become the value field for the multiselect's options, it becomes impossible to set the value for the checked multiselect. Here's why:
    44
     5{{{
     6(dijit.form._FormSelectWidget)
    57
    6 (dijit.form._FormSelectWidget)
    78289 dojo.forEach(newValue, function(i, idx){
    89290 if(!dojo.isObject(i)){
     
    1617298 }, this);
    1718299
    18 
     19}}}
    1920
    2021Line 291 casts the new value(s) to a string, while on line 295 it type-sensitive compares the new values to the option values. If the option values are integers, it becomes impossible to set the values.