Opened 12 years ago

Closed 12 years ago

Last modified 9 years ago

#4596 closed defect (fixed)

Provide selected item for a ComboBox

Reported by: wolfram Owned by: bill
Priority: high Milestone:
Component: Dijit - Form Version: 0.9
Keywords: ComboBox Cc:
Blocked By: Blocking:

Description

This simple patch provides the selected item for the combobox widget, as discussed with bill on IRC. (Passing the item as second paramter to onChange() would be too complicated, since that is done in one of the base classes :-( I didn't find an easy way?)

You can now do, after one item had been selected:

    var item = widget.item;

in order to retreive the data from the item you can now (or have to) do the following

    var name = widget.store.getValue(item, "name");
    var someValue = widget.store.getValue(item, "someAttribute");

Attachments (1)

combobox_item.patch (802 bytes) - added by wolfram 12 years ago.
provide the selected item

Download all attachments as: .zip

Change History (4)

Changed 12 years ago by wolfram

Attachment: combobox_item.patch added

provide the selected item

comment:1 Changed 12 years ago by bill

Resolution: fixed
Status: newclosed

(In [10668]) Expose currently selected item as ComboBox?.item. Patch from Wolfram (CLA on file). Fixes #4596.

comment:2 Changed 12 years ago by bill

Resolution: fixed

(In [10669]) Expose currently selected item as ComboBox?.item. Fixes #4596.

comment:3 Changed 9 years ago by bill

Component: DijitDijit - Form
Note: See TracTickets for help on using tickets.