Seems like the id = core.post__2 is given twice. Maybe you shouldn't
On Dec 22, 10:19 am, Hoang Le Thanh <
lethanhhoan...@gmail.com> wrote:
> Hi,
>
> I run dojotree sample in dojango-sample:
https://github.com/klipstein/dojango-sample
>
> The returned JSON data is:
>
> {"items": [{"comment": "comment 1", "id": "core.post__1", "name": "Author
> 1", "children": [{"comment": "comment 1.1", "id": "core.post__2", "name":
> "Author 1.1", "children": []}, {"comment": "Comment 1.2", "id":
> "core.post__3", "name": "Author 1.2", "children": []}]}, {"comment":
> "comment 1.1", "id": "core.post__2", "name": "Author 1.1", "children": []}],
> "identifier": "id", "label": "name"}
>
> Error message from firebug:
>
> "dojo.data.ItemFileReadStore: The json data as specified by: [/mptree/] is
> malformed. Items within the list have identifier: [id]. Value collided:
> [core.post__2]"
>
> By the way, help me how to remove "children": [] from return JSON data,
> dijit.tree don't realize where is a leaf or a node.
>
> On Wed, Dec 22, 2010 at 3:29 PM, klipstein