You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Borja Martín <bo...@dagi3d.net> on 2005/03/18 19:21:11 UTC
tree2 suggestion
hi,
I would suggest the method getParent in the TreeBaseNode as the
DefaultMutableTreeNode class had, in order to get the parent node of the
given one
bye
Re: tree2 suggestion
Posted by Borja Martín <bo...@dagi3d.net>.
suppose we have the following tree:
+--home
+--section1
+--section2
+--section3
+--section4
If the user selects the section4 node, you should be able to access to
its parent, section2, and from section2, to the 'home' node
so if we store all the parents in a list, we should have this:
section4, section2, home
eventually, if we reverse this list, we would get the whole path to the
selected node: home, section2, section4
without being able to access to the parent nodes, we could do it
searching through the whole tree, but it would be slower
bye
Sean Schofield wrote:
> Borja,
>
> getPathInformation might be a possibility for you although it requires
> a specific node id. Its also not currently available to your JSP
> code.
>
> I don't understand what you mean by accessing the parent node and then
> reversing the path. What is the end result you are looking for? Do
> you want the id of each node in the path?
>
> I would like to understand your requirements a little bit more before
> I think about how we might be able to address them.
>
> sean
>
>
> On Fri, 18 Mar 2005 19:44:47 +0100, Borja Martín <bo...@dagi3d.net> wrote:
>
>>I built a section menu and would like to get the whole path of the
>>selected section. It is quite easy if you can access the parent node and
>>then reversing the path.
>>I have seen the getPathInformation method, but I only returns the nodes
>>ids...
>>
>>
>>Sean Schofield wrote:
>>
>>
>>>Just curious, why do you feel that is needed? What are you planning
>>>on using it for?
>>>
>>>sean
>>>
>>>
>>>On Fri, 18 Mar 2005 19:21:11 +0100, Borja Martín <bo...@dagi3d.net> wrote:
>>>
>>>
>>>
>>>>hi,
>>>>I would suggest the method getParent in the TreeBaseNode as the
>>>>DefaultMutableTreeNode class had, in order to get the parent node of the
>>>>given one
>>>>
>>>>bye
>>>>
Re: tree2 suggestion
Posted by Sean Schofield <se...@gmail.com>.
Borja,
getPathInformation might be a possibility for you although it requires
a specific node id. Its also not currently available to your JSP
code.
I don't understand what you mean by accessing the parent node and then
reversing the path. What is the end result you are looking for? Do
you want the id of each node in the path?
I would like to understand your requirements a little bit more before
I think about how we might be able to address them.
sean
On Fri, 18 Mar 2005 19:44:47 +0100, Borja Martín <bo...@dagi3d.net> wrote:
> I built a section menu and would like to get the whole path of the
> selected section. It is quite easy if you can access the parent node and
> then reversing the path.
> I have seen the getPathInformation method, but I only returns the nodes
> ids...
>
>
> Sean Schofield wrote:
>
> >Just curious, why do you feel that is needed? What are you planning
> >on using it for?
> >
> >sean
> >
> >
> >On Fri, 18 Mar 2005 19:21:11 +0100, Borja Martín <bo...@dagi3d.net> wrote:
> >
> >
> >>hi,
> >>I would suggest the method getParent in the TreeBaseNode as the
> >>DefaultMutableTreeNode class had, in order to get the parent node of the
> >>given one
> >>
> >>bye
> >>
> >>
> >>
> >
> >
> >
>
>
Re: tree2 suggestion
Posted by Borja Martín <bo...@dagi3d.net>.
I built a section menu and would like to get the whole path of the
selected section. It is quite easy if you can access the parent node and
then reversing the path.
I have seen the getPathInformation method, but I only returns the nodes
ids...
Sean Schofield wrote:
>Just curious, why do you feel that is needed? What are you planning
>on using it for?
>
>sean
>
>
>On Fri, 18 Mar 2005 19:21:11 +0100, Borja Martín <bo...@dagi3d.net> wrote:
>
>
>>hi,
>>I would suggest the method getParent in the TreeBaseNode as the
>>DefaultMutableTreeNode class had, in order to get the parent node of the
>>given one
>>
>>bye
>>
>>
>>
>
>
>
Re: tree2 suggestion
Posted by Sean Schofield <se...@gmail.com>.
Just curious, why do you feel that is needed? What are you planning
on using it for?
sean
On Fri, 18 Mar 2005 19:21:11 +0100, Borja Martín <bo...@dagi3d.net> wrote:
> hi,
> I would suggest the method getParent in the TreeBaseNode as the
> DefaultMutableTreeNode class had, in order to get the parent node of the
> given one
>
> bye
>