Opened 14 years ago
Closed 14 years ago
#1451 closed defect (fixed)
ComboBox/Select setValue not working as expected
Reported by: | Owned by: | Douglas Hays | |
---|---|---|---|
Priority: | high | Milestone: | 0.9 |
Component: | Widgets | Version: | 0.3 |
Keywords: | ComboBox, Select | Cc: | [email protected]…, [email protected]… |
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 14 years ago by
Milestone: | → 0.5 |
---|---|
Owner: | changed from bill to alex |
comment:2 Changed 14 years ago by
Cc: | [email protected]… [email protected]… added |
---|
comment:3 Changed 14 years ago by
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 14 years ago by
Owner: | changed from alex to Douglas Hays |
---|
comment:5 Changed 14 years ago by
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.
Please verify that calling setAllValues(value,labelValue) does what you were expecting setValue() to do by itself.