Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#16828 closed defect (fixed)

CheckedMultiSelect: "TypeError: Cannot read property '0' of undefined

Reported by: omega Owned by: omega
Priority: undecided Milestone: 1.8.4
Component: DojoX Form Version: 1.8.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

Line 316 of CheckedMultiSelect.js in dojox seems to be experiencing an issue.

If I change it to pull as opposed to item.value[0], things start working.

I guess this has to use the idProperty of the store perhaps? Just a guess, I'm not 100% sure of the lifecycle here, I just know what to poke to get things working...

Attachments (1)

CheckedMultiSelectTest.html (1.7 KB) - added by omega 9 years ago.
Hopefully this works for you…

Download all attachments as: .zip

Change History (6)

comment:1 Changed 9 years ago by bill

Description: modified (diff)
Owner: changed from dante to omega
Status: newpending

How do you reproduce the problem?

comment:2 Changed 9 years ago by bill

Also, do you really want the store to indicate the initially selected items, rather than using the value attribute? And if yes, were you expecting updates to the CheckedMultiSelect to be reflected back to the store? There's no code for that AFAIK.

comment:3 Changed 9 years ago by omega

Status: pendingnew

Here's how I'm instantiating one where the hidden select remains empty and I can't check options:

Changed 9 years ago by omega

Attachment: CheckedMultiSelectTest.html added

Hopefully this works for you...

comment:4 Changed 9 years ago by bill

Milestone: tbd1.8.4
Resolution: fixed
Status: newclosed

Reproduced the failure (where clicking the radio buttons has no effect) on 1.8.3, but it's fixed in 1.8.4, thanks to [30568]. That's a backport of a bunch of changes; I didn't trace down the real change that fixed it.

comment:5 Changed 9 years ago by bill

In [30865]:

Remove setStore() override method. It was there to let the store indicate which items were originally selected, but didn't seem to work correctly (refs #16828), and broke support for the new dojo/store API. It's probably something that should be handled by dojox/mvc anyway. Fixes #16815 !strict. Thanks to adros (CLA on file) for the patch to the test.

Note: See TracTickets for help on using tickets.