Re: Tree leaf not selectable
I didn't realise you can click on the label! That works fine. The javascript error occurs when you click on the leaf's icon. On 21/04/2012, at 12:10 AM, Lance Java wrote: Are you sure that you are returning consistent values for hasChildren() and getChildren(). It sounds like you might be returning true for hasChildren() but getChildren() is returning an empty list. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tree leaf not selectable
Lodged as TAP5-1911. Thanks for the workaround. On 20/04/2012, at 2:20 AM, George Christman wrote: I essentially had to do the same thing Lance suggested. This bug exist in the Tapestry-Jquery implementation too. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tree-leaf-not-selectable-tp5651521p5652216.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Tree leaf not selectable
Are you sure that you are returning consistent values for hasChildren() and getChildren(). It sounds like you might be returning true for hasChildren() but getChildren() is returning an empty list.
Tree leaf not selectable
I can't make a tree leaf selectable. When I click on a leaf there's a _javascript_ error in tree.js:function doAnimate(element) {var sublist = $(element).up('li').down("ul");var dim = sublist.getDimensions();tree.js:52TypeError: 'undefined' is not an object (evaluating 'sublist.getDimensions')var duration = Math.min(dim.height * cfg.ANIMATION_RATE,cfg.MAX_ANIMATION_DURATION)new Effect.toggle(sublist, cfg.TOGGLE_TYPE, {duration : duration,queue : {position : 'end',scope : cfg.QUEUE_NAME}});}Just in case the above error didn't got lost on the way to the mailing list, it says: TypeError: 'undefined' is not an object (evaluating 'sublist.getDimensions')It is undefined because I clicked on 'tree_1', which has an 'li' up from it but no 'ul' down from there:li span id="tree_1" class="t-tree-icon t-leaf-node t-tree-expanded"/span span class="t-tree-label t-selectable" 100 Philosophy /span/liI saw in the doco that I have to provide a TreeSelectionModel if I want it to be selectable, and that is what I had done: t:tree t:id="tree" t:model="treeModel" t:selectionModel="selectionModel"/ public TreeSelectionModelCategoryNode getSelectionModel() { if (selectionModel == null) { selectionModel = new DefaultTreeSelectionModelCategoryNode(); } return selectionModel; }Have I missed something or is this a bug?Cheers,Geoff
Re: Tree leaf not selectable
Hi Geoff, from what I've seen, the tree nodes don't do anything when selected. You can set the label parameter if you'd like to do something special. t:tree model=... id=myTree p:label t:if myTree.node.leaf t:eventlink event=leafSelected context=myTree.node.value / t:else ${myTree.node.label} /t:else /t:if /p:label /t:tree
Re: Tree leaf not selectable
I essentially had to do the same thing Lance suggested. This bug exist in the Tapestry-Jquery implementation too. -- View this message in context: http://tapestry.1045711.n5.nabble.com/Tree-leaf-not-selectable-tp5651521p5652216.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org