Finally i could make it.... Thanks to all who helped me to do this... Thanks
a lot.
i solved two problems one is extending tree and one is finding parent of a
tree node selected. i am giving code here for ref"
Tree
<sx:tree id="tree1" rootNode="%{rootField}"
childCollectionProperty="children" nodeIdProperty="fieldID"
nodeTitleProperty="fieldName" treeSelectedTopic="treeSelected"
expandedNotifyTopics="treeExpanded" >
</sx:tree>
Tree Expand function which will be called on window load event
window.onload=function(){
var nodes =dojo.widget.manager.getWidgetsByType('struts:StrutsTreeNode');
for( var i=0; i < nodes.length; i++){
nodes[i].expand();
}
}
finding parent of a node selected .
function treeNodeSelected(message) {
alert("Parent Node = "+message.node.parent.widgetId);
document.form1.parentFieldID.value=message.node.parent.widgetId;
}
dojo.event.topic.subscribe("treeSelected",this,treeNodeSelected);
Have Nice time...
Ganesh123 wrote:
>
> Hi
> Is it possible to display a tree expanded by default?
> I am using struts 2.1.2 dojo-plugin to create the tree structure. any one
> used tree...plz help me
>
>
--
View this message in context:
http://www.nabble.com/Tree-default-expanded----tp19685627p19894862.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]