Closed p5hema2 closed 10 years ago
p.s. your plugin is working fine with the exaplestores. you may notice that i have changed the classnames...
Hi, it seems that url: 'http://www.json-generator.com/j/bPBVAqubvS?indent=4' is returning an array and not an object? I see your treestore has rootProperty: 'items', so I would expect you to receive an object similar to this:
{items: <= your data is missing this and closing brace below [ { text: "Today", expanded: true, items: [ { text: "MowGrass1", items: [ { text: "MowGrass2", items: [ { text: "MowGrass3", items: [ { text: "MowGrass4", leaf: true }, { text: "BuyGroceries", leaf: true }, { text: "WatchGame", leaf: true } ] }, { text: "BuyGroceries", leaf: true }, { text: "WatchGame", leaf: true } ] }, { text: "BuyGroceries", leaf: true }, { text: "WatchGame", leaf: true } ] }, { text: "BuyGroceries", leaf: true }, { text: "WatchGame", leaf: true } ] }, { text: "Tomorrow", items: [ { text: "Frisbee", leaf: true }, { text: "Cookout", leaf: true } ] } ] }
Look at .\TouchTreeGrid-master\TouchTreeGrid_Advanced_22\data\treegrid.json for sample format that works without root node (Project Example). In this case ProjectsStore doesn't specify rootProperty because 'children' is the default.
I didn't test my theory with your data, but I've implemented tons of examples in this way that work without displaying root node.
Hope this helps, Steve
I'll try it today at work.
Hi,
i don't know if have have done something wrong but i have the problem. That i oculd get anything displayed without
when i where loading my data from
http://www.json-generator.com/j/bPBVAqubvS?indent=4 (it is a little modified version of your example data).
My Store:
My List:
So i edited your plugin to get it working with
Here is my edited version of your plugin: changes: line 22 --> added hideRoot: false, line 126-129 --> calling method replaceIsVisible line 1212-1243 --> replaceIsVisible method
I hope you can give me any hint if i had done something wrong, or you may want to add the feature to your plugin. It is up to you.
With best Regards, Martin Heß