-
24 Aug 2008 8:37 PM #11
Also, I am completely unable to get it to work with AsyncTreeNode. Do you think I need to try harder, or is that not build into this?
-
24 Aug 2008 10:30 PM #12Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
@rtconner: Your example doesn't set the uiProvider for all child nodes. Either set the uiProvider in the baseAttrs of the tree loader (as I did) or specify the uiProvider in every child node (see the ColumnTree example). This also applies to AsyncTreeNode!
@fermo111: It supports an 'unlimited' number of branches. Your example must be flawed somewhere, because I am able to add a number of extra levels without any problem.
ps. TriStateNodeUI does require that you fill the checked config option of the nodes correctly on startup!
-
25 Aug 2008 12:31 AM #13
This was really the reason why I thought it didn't work when adding an additional level.
Since you ask, I would say the TreeNodeUI should implement the expected behaviour as the user perceives it, that is, when you uncheck a parent node, all the children are really unchecked as well. I understand there is a problem with the AsyncTreeNode, but maybe the AsyncTreeNode is not the right class to use for a control of this kind, or, keeping the async nature of the tree, you could apply the user choices on the parent node to the children nodes that are loaded later.
Thanks
Luca
-
28 Aug 2008 11:36 PM #14
-
11 Sep 2008 8:32 AM #15
I can't get the checkboxes to show in my tree. I have one root with two async children. Here is my setup:
Why can't I get this treestate to work. There are no errors, simply no checkboxes.Code:/****** TREE ****/ var tree = new xt.TreePanel({ title: 'Mapper', collapsible: false, animCollapse: false, border: true, rootVisible: false, id: "tree_referencearchive", autoScroll: true, animate: false, enableDD: true, containerScroll: true, width: 300, minSize: 175, maxSize: 400, useArrows: true, split: true, region: 'west', collapsible: true, collapsed: false, useSplitTips: true, listeners: { click: function(node) { var store = files.getStore(); store.baseParams.id = node.attributes.id; store.load(); } }, baseAttrs: { uiProvider: Ext.tree.TriStateNodeUI, checked: false } }); var root = new xt.TreeNode({ text: 'Referansedokumenter', allowDrag: false, id: 'tree_root', draggable: false, preloadChildren: true, baseAttrs: { uiProvider: Ext.tree.TriStateNodeUI, checked: false } }); root.appendChild(new xt.AsyncTreeNode( { id: 'tags', text: 'Kategorier', icon: '/content/images/icons/tag_blue.png', allowDrag: false, loader: new xt.TreeLoader({ dataUrl: '/ReferenceArchive/GetTagsTree/', preloadChildren: true, baseAttrs: { uiProvider: Ext.tree.TriStateNodeUI, checked: false } }) })); root.appendChild(new xt.AsyncTreeNode( { id: 'fmentity', text: 'Fasiliteter', icon: '/Content/images/icons/chart_organisation.png', allowDrag: false, loader: new xt.TreeLoader({ dataUrl: '/FacilitCore/GetTreeJson/', preloadChildren: true, baseAttrs: { uiProvider: Ext.tree.TriStateNodeUI, checked: false } }) })); tree.setRootNode(root);
-
11 Sep 2008 10:09 AM #16Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- The Netherlands
- Posts
- 24,251
- Vote Rating
- 41
You are putting the checked config option in baseAttrs of the loader, but it should be in the config of the node itself.
Putting it in baseAttrs doesn't help, because that will copy the checked config option to the node instead of the node attributes.Last edited by Condor; 11 Sep 2008 at 12:23 PM. Reason: baseParams -> baseAttrs
-
11 Sep 2008 10:22 AM #17
baseParams? are they the same as baseAttrs? I feel confused

-
8 Oct 2008 1:54 AM #18
Could some one make text nodes line wrapping for tree?
It will be very useful for long node text labels!
-
8 Oct 2008 1:57 AM #19
-
8 Oct 2008 2:55 AM #20


Reply With Quote
Thanks for sharing.