Opened 11 years ago

Closed 11 years ago

#8846 closed defect (invalid)

TreeStoreModel should check if store.setValues exists

Reported by: abaumhau Owned by: bill
Priority: high Milestone: 1.4
Component: Dijit Version: 1.3.0b2
Keywords: Cc:
Blocked By: Blocking:

Description

When using a read store, TreeStoreModel? (line 186) should not attempt to make changes to the store (using non-existent functions).

Test case:

Create a dojo.data.ItemFileReadStore?, and a dojo.data.ItemFileWriteStore?, and build two trees with simple data.

On the RO tree, start a dnd on a node, move ever so slightly until the avatar appears (green), and drop the node (not really changing anything). The standard code will error out in TreeStoreModel?.js line 186 when calling store.setValues because ItemFileReadStore? does not have write functions.

Attachments (2)

TreeStoreModel.js.patch (899 bytes) - added by abaumhau 11 years ago.
Patch to fix writes to read only store
Tree.js.patch (283 bytes) - added by abaumhau 11 years ago.
Patch to check that node defined in _expandNode

Download all attachments as: .zip

Change History (6)

comment:1 Changed 11 years ago by bill

Component: GeneralDijit
Milestone: tbd1.4
Owner: changed from anonymous to bill
Status: newassigned

comment:2 Changed 11 years ago by abaumhau

Applying patch (provided) exposes another bug in Tree.js where _expandNode needs to test for node being null (patch provided).

Changed 11 years ago by abaumhau

Attachment: TreeStoreModel.js.patch added

Patch to fix writes to read only store

Changed 11 years ago by abaumhau

Attachment: Tree.js.patch added

Patch to check that node defined in _expandNode

comment:3 Changed 11 years ago by bill

I'm unclear though why you enabled DnD on a tree that's read-only. Was it to drag from that tree and drop somewhere else?

Also, when is it that _expandNode() is called with a null argument? Can you give a test case?

comment:4 Changed 11 years ago by bill

Resolution: invalid
Status: assignedclosed

Closing for lack of test case. Reopen w/a test case (attached using the attach file button).

Note: See TracTickets for help on using tickets.