Comments (6)
The cbtree does not check the store for updates, instead the store model listens for events from the store. All store related updates are event driven. To dynamically update the cbtree your store MUST emit change, new or remove events.
To have your custom store emit those kind of events you can use the Eventable store wrapper or you can implement your own event emission by including cbtree/Evented.js in your custom store.
You can take a look at the cbtree ObjectStore how the cbtree/Evented.js
module is used.
Let me know if that works.
from cbtree.
I did actually try the Eventable wrapper before I posted that without any luck.
I did switch my store to mixing in your evented instead of the dojo one and am emitting the change event. this event is firing (I am catching it outside the tree as well to log it), but the readonly is not being updated still.
this.emit("change", { type: "change", detail: { item: object, oldItem: orgObj} });
Thanks for the quick reply!
from cbtree.
OK, considering you are using a customized store and I don't know which store you based it on (dojo/store or cbtree/store), please check the following:
- On order for the store model to recognize any store to be able to generate events, the store MUST
have two properties:- an emit() method
eventable = true
As in:
emit: function (...) {
},
eventable: true,
Typically, the Eventable wrapper sets those properties for you.
Also make sure your have the enabledAttr property of the store model set to a valid store property. The default is an empty string.
from cbtree.
That was it, was missing the:
eventable: true
Thank you so much for your assistance, scrolled right down to the put method and skipped over that in the objectstore.
from cbtree.
Sorry to reopen this, but I have a related question. I got back to working on this this morning and noticed that the parent checkboxes are not being updated when children are clicked, and vice versa. In trouble shooting I removed the eventable: true from my store and now the checkboxes don't work but I'm back to the previous problem.
Just wondering if you have any ideas on what might cause this behavior? I was apparently so excited the readonly was working I didn't realize the vital bit wasn't functioning. Thanks for any help you can give!
from cbtree.
It is a little hard for me to 'remotely' diagnose the problem without having see any of your code. Please post a short question @ http://www.thejekels.com/blog/featured/the-new-dijit-checkbox-tree/ so I have your email and we can take this off line. For starters, list all version number of the products your are using such as dojo, cbtree. What kind of store model are you using? etc, etc.
from cbtree.
Related Issues (20)
- Hover/ mouse over / out HOT 5
- Tree Node highlight HOT 1
- Json files HOT 2
- how to set the checkbox to false in the tree? HOT 2
- Retrieving depth of an item HOT 6
- idProperty locked to "name" ? HOT 2
- Unable to keep branch node expanded as long as there is a ticked leafcheck-boxes HOT 2
- How to renew stores with each different data, thus refreshing tree. HOT 3
- Unable to load the same tree twice HOT 2
- Publish to bower
- Disable processing bar when creating cbtree HOT 2
- Download Site HOT 2
- Programmatically set checked state HOT 1
- Drag & Drop Issue HOT 1
- Checkboxes states for lazy loading mode HOT 1
- cbtree not working with dojo 1.10 HOT 3
- update to dgrid & dstore and Dojo 1.10.*
- sorting with ForestStoreModel HOT 2
- Tree openOnChecked not working
- Customizing the leaf Renderers
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbtree.