PDA

View Full Version : ComboBox - how to set the default item in the field?



mmiotk
24 Apr 2008, 6:54 AM
How can I set the default value from ComboBox.
I try:

a) call ComboBox: : select(5)
b) call ComboBox: : setValue("MyItemLabel");
c) call ComboBox: : setValue(new CDCBaseModel("MyItemLabel")); where CDCBaseModel extends BaseModel and overrides hashCode() and equals()

but these variants doesn't give any effects.

(I work with Firefox browser)

darrellmeyer
24 Apr 2008, 12:31 PM
There was a bug in setValue that has been fixed. You can pass a record that is in the store or text that will match the value field of a record in your store. Fix is in SVN.