View Full Version : uiOutline expanded by default
farouksabry
26 Mar 2008, 9:14 AM
Hi all,
Can someone tell me how to make the left uiOutline to be expanded by default when the main page is loaded?
Thank you.
jratcliff
26 Mar 2008, 1:20 PM
Hmm, that's a bug. The data from ?ReadEntries tells us which nodes are already expanded (from how the outline was saved). So we should read in that information and expand those nodes that are supposed to be. I'll do the fix now so that it is included in the next beta.
However, if you need to do this the Ext way, then look at the "expand" method of TreeNode
http://extjs.com/deploy/dev/docs/?class=Ext.tree.TreeNode
farouksabry
26 Mar 2008, 9:23 PM
Thanks jratcliff,
I did it by setting the expanded property of the treeNode to true , but it could be better if it is passed as a parameter in the uiOutline.
var curNode = new Tree.TreeNode({
text : extndTitle,
cls : cls,
allowDrag : true,
allowDrop : (extndType == "20" || extndType == "0") ? true : false,
isTarget : true,
leaf : false,
extndHref : extndHref,
extndType : extndType,
extndExpandable: isExpandable,
expanded : true,
extndPosition : curPosition,
icon : (this.useOutlineIcons) ? extndIcon : null
});
jratcliff
27 Mar 2008, 1:57 PM
Thanks jratcliff,
I did it by setting the expanded property of the treeNode to true , but it could be better if it is passed as a parameter in the uiOutline.
Yep, did the same thing as you and set the expanded property. I also went ahead and read in what the current value is in the xml returned from the ?ReadEntries command so that the UIOutline is expanded the same way as the outline is saved in Domino Designer.
If you look at our online demo (http://openntf.org/extnd/demo.nsf) on the openNTF site you'll see that the outline on the left is no longer all collapsed. Some of the entries now load initially expanded and that is because the outline was saved that way in Designer.
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.