Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#10687 closed defect (invalid)

filteringselect doesn't initialize properly if value is set but no options are available!

Reported by: gerhard presser Owned by:
Priority: high Milestone: tbd
Component: Dijit - Form Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:

Description

<select dojoType="dijit.form.FilteringSelect?" value="1"></select>

gives a js-error (node is not defined - at dojo.attr) and all other widgets fail to load.

this markup worked in 1.3.2 but fails in 1.4(.1)

I attached a possible patch for this problem. I don't know if item==null is a valid scenario for the onItem callback!?

Attachments (2)

patch.txt (601 bytes) - added by gerhard presser 10 years ago.
test_FilteringSelect.html (701 bytes) - added by alamore 10 years ago.

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by gerhard presser

Attachment: patch.txt added

comment:1 Changed 10 years ago by bill

Milestone: 1.4.2tbd
Priority: highnormal
Resolution: invalid
severity: majorminor
Status: newclosed

I don't understand, you haven't specified a data store at all for the filtering select. You need to specify a store (or a set of options, which is implicitly turned into a store) that defines an item with id=1.

Changed 10 years ago by alamore

Attachment: test_FilteringSelect.html added

comment:2 Changed 10 years ago by alamore

Resolution: invalid
Status: closedreopened

I also believe this is a bug. I've run into a similar situation where I do have options for the select, but the value set in markup does not match the value of any of the options.

I've attached a simple test case where there are two options (A and C) but the value is set to B. If you run it with Dojo 1.3.2, then the value is set to blank (with a validation tooltip when required==true). But if you run it with Dojo 1.4(.1) then the js error (node is undefined) is given and the widget fails to load.

comment:3 Changed 10 years ago by alamore

Also, I forgot to mention, the submitted patch by gpresser makes my test work.

comment:4 Changed 10 years ago by bill

Resolution: invalid
Status: reopenedclosed

Sorry, but you were both depending on a bug in 1.3 that was fixed in 1.4.

comment:5 Changed 8 years ago by bill

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