Opened 13 years ago
Closed 13 years ago
#6763 closed defect (invalid)
Tree: not fully compliant to the store.Write API
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Dijit | Version: | 1.1.0 |
Keywords: | store tree api parentInfo | Cc: | Sam Foster, Jared Jurkiewicz |
Blocked By: | Blocking: |
Description
As talked on IRC to sfoster, here is what I found being "wrong" with dijit.Tree. The dojo.data.api.Write defines for the newItem(item, parentInfo) method, that parentInfo looks like {parent : /*item*/, attribute : /*string*/}
The dijit.Tree instead tests for parentInfo.item, which should be parentInfo.parent. This can be seen in Dojo 1.1.1 on line 1111 of dijit.Tree
this.onChildrenChange(parentInfo.item, children);
When using an own store this leads to misbehaviour when programmatically adding items to the store.
Change History (2)
comment:1 Changed 13 years ago by
Cc: | Jared Jurkiewicz added; [email protected]… removed |
---|---|
Reporter: | changed from guest to [email protected]… |
Summary: | dijit.Tree not fully compliant to the store.Write API → Tree: not fully compliant to the store.Write API |
comment:2 Changed 13 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
Ok, we talked on IRC... this was actually a problem w/the custom store not implement Notification correctly, given the confusing disparity between the parentInfo structure used in the Write API vs. the Notification API.
Hmm, so I think this is based on the notification API (see Notifcation.js) which defines:
I see the code you are talking about in the Write API:
but not sure how it's relevant here. Is there a test case of something that's failing?
You can ping me too on IRC (wildbill).