Opened 13 years ago

Closed 12 years ago

#1451 closed defect (fixed)

ComboBox/Select setValue not working as expected

Reported by: acirov@… Owned by: Douglas Hays
Priority: high Milestone: 0.9
Component: Widgets Version: 0.3
Keywords: ComboBox, Select Cc: acirov@…, doughays@…
Blocked By: Blocking:

Description

ComboBox?'s setValue is not updating the state. It updates the value but the label remains the same. The problem is in dojo.widget.html.stabile.setState() .

This is not an issue for the ComboBox?, as you're not expected to need the hidden value, but it's a problem if you use Select widget and you need to manually set selected value. You'd expect the corresponding label to show up but that's not what happens. Old label remains displayed, although the correct value has been set.

Change History (6)

comment:1 Changed 13 years ago by dylan

Milestone: 0.5
Owner: changed from bill to alex

comment:2 Changed 13 years ago by Douglas Hays

Cc: acirov@… doughays@… added

Please verify that calling setAllValues(value,labelValue) does what you were expecting setValue() to do by itself.

comment:3 Changed 13 years ago by acirov@…

setAllValues() correctly sets both values. At least in the Select widget, setValue and setSelectedValue should display the same behavior. I don't see why ComboBox? shouldn't do the same since it already has value pairs. It would spare users from the need to keep lookup arrays just to be able to set values.

comment:4 Changed 13 years ago by Douglas Hays

Owner: changed from alex to Douglas Hays

comment:5 Changed 13 years ago by haysmark@…

Combobox (now AutoCompleter?) will not have support for hidden values in the next release.

Select's setValue, on the other hand, now does a reverse lookup to get the correct label.

There is no setAllValues now; it's just setValue, for both AutoCompleter? and Select.

comment:6 Changed 12 years ago by Douglas Hays

Resolution: fixed
Status: newclosed

(In [8352]) Port of ComboBox?(=AutoCompleter?) and Select widgets to 0.9 dojo by haysmark@…. Fixes #2189, #1504, #1451, #2244, #2384, #2070, #899, #912, #1267, #1339, #1456, #1484, #1485, #2558, #1186

Note: See TracTickets for help on using tickets.