struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narayana S" <narayanas...@gmail.com>
Subject Re: Struts 2.1 Tree Problem
Date Fri, 12 Sep 2008 07:16:21 GMT
i found solution to the parent node item.

here is the code snippet ..
*tree construction *
<sx:tree id="contentTree" name="contentTree"
            label="Root" treeSelectedTopic="treeSelected"
expandedNotifyTopics="treeExpand">
-----
-----
</sx:tree>
*java Script code *
<script language="javascript">
dojo.event.topic.subscribe("treeExpand", function treeNodeExpanded(message)
{
         alert(message.node.widgetId);
    });
</script>

while constructing the tree expandedNotifyTopics attribute can be used to
specify the function to be executed while expanding the tree, when a node is
expanded i am taking that root node and preserve in a variable... so when a
node is selected what is there in the parent variable is the parent node.

still i didn't find a way to show tree extended default... any help is
greatly appreciated.

Thanks in advance

On Fri, Sep 12, 2008 at 12:06 PM, Jukka Välimaa <valimaa.jukka@gmail.com>wrote:

> As far as I know, there is no way to set some nodes already extended
> server-side. You can open the nodes you want client-side using javascript,
> however.
> On Fri, Sep 12, 2008 at 6:48 AM, Narayana S <narayanasgs1@gmail.com>
> wrote:
>
> > Hi Jim,
> >
> >            Thanks for your reply, tree control default shows only root
> > node, but
> > 1. i want it to be shown extended by default to show the specified active
> > node.
> > 2. if i pass any node i want to find out the parent node of that node in
> > the
> > jsp page itself (in DOJO)
> >
> > i am kind of stuck in my process...  help me.
> >
> >
> >
> >
> > On Thu, Sep 11, 2008 at 6:23 PM, Jim Kiley <jhkiley@summa-tech.com>
> wrote:
> >
> > > We aren't deliberately ignoring you... many readers of this list are in
> > the
> > > Americas, and you sent your first message after most of us went to bed
> > and
> > > your followup before most of us woke up. :-)
> > > (I have no idea what the answer to your question is, I have not used
> the
> > > tree control at all -- but what have you tried? Can you share your code
> > > with
> > > us so that we can help point you in the right direction?)
> > >
> > > jk
> > >
> > > On Thu, Sep 11, 2008 at 5:08 AM, Narayana S <narayanasgs1@gmail.com>
> > > wrote:
> > >
> > > > did any one see this email.... please help me
> > > >
> > > > On Thu, Sep 11, 2008 at 10:17 AM, Narayana S <narayanasgs1@gmail.com
> >
> > > > wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >    now i am working with tree control, when i load the tree i want
> to
> > > > load
> > > > > it default extended and what ever the node id i pass that should
be
> > > > > activated. how i can achieve this using struts 2.1 version. and one
> > > more
> > > > > thing is when i select a node in the jsp page itself i have to find
> > out
> > > > the
> > > > > parent of the node selected.
> > > > >
> > > > > please help me to solve this issue, i am kind of stuck..
> > > > >
> > > > > Thanks in advance.
> > > > >
> > > >
> > >
> > >
> > >
> > > --
> > > Jim Kiley
> > > Technical Consultant | Summa
> > > [p] 412.258.3346 [m] 412.445.1729
> > > http://www.summa-tech.com
> > >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message