Hi,

       Thanks for your reply, i tried this code but it is returning
nodes.length as zero though i have a tree with 1 root and 3 child nodes for
root. this is my code snippet
*tree

*<sx:tree id="tree1" rootNode="%{rootField}"
childCollectionProperty="children" nodeIdProperty="fieldID"
nodeTitleProperty="fieldName" treeSelectedTopic="treeSelected"
expandedNotifyTopics="treeExpanded" />

*javascript*

<script>
var nodes = dojo.widget.manager.getWidgetsByType('struts:StrutsTreeNode');
    alert("Number of nodes"+nodes.length);
    for( var i=0; i < nodes.length; i++){
        nodes[i].expand();
    }
</script>

what is the problem? am i missing anything? please help me to solve this
issue.

On Tue, Sep 30, 2008 at 7:49 PM, Jukka Välimaa <[EMAIL PROTECTED]>wrote:

> As far as I know, it is not possible to expand tree widget server-side.
> Client-side, javascript can be used to open the tree, like so:var nodes =
> dojo.widget.manager.getWidgetsByType('struts:StrutsTreeNode');
> for( var i=0; i < nodes.length; i++){
>     nodes[i].expand();
> }
>
> Jukka
>
> On Tue, Sep 30, 2008 at 4:59 PM, Narayana S <[EMAIL PROTECTED]>
> wrote:
>
> > any one who worked on tree control plz give some helping hand....
> >
> >
> >
> > On Fri, Sep 26, 2008 at 3:34 PM, Narayana S <[EMAIL PROTECTED]>
> > 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
> > >
> >
>

Reply via email to