You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by mitroiasi <mi...@yahoo.com> on 2009/04/24 09:30:45 UTC

Set a node invisible in tree2


Hi,

I want to set a node invisible in a tree2 component.
I didn't find any proper method to do this.
Is it possible to implement this?
If yes, how?

Thank you
-- 
View this message in context: http://www.nabble.com/Set-a-node-invisible-in-tree2-tp23211324p23211324.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Set a node invisible in tree2

Posted by mitroiasi <mi...@yahoo.com>.

Hi Georg,

Your idea is very good and I have tried to implement this and in some way it
works. The main problem is the fact that the link is not shown anymore but
the space between the other nodes is the same (empty space between) and the
dotted line is still there.
This style I cannot attach to the facet tag.

I will dig more.
-- 
View this message in context: http://www.nabble.com/Set-a-node-invisible-in-tree2-tp23211324p23365800.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Set a node invisible in tree2

Posted by Georg Füchsle <gi...@googlemail.com>.
Hallo,


maybe You can do like this:

You override your treenode class with an own class that also has a
member 'visible' that is set when creating the treenodes. Then you can
ask this value in your jsp code.

for example similar like this:

<t:commndButton style="#{!node.visible 'display:none': ''}" .../>

I have no example, where I can try this; so I canot promise, if this will work.

Georg


2009/4/29 mitroiasi <mi...@yahoo.com>:
>
>
>
> Hallo Georg,
>
> Thank you for your reply.
> But I want to set the invisible, not to delete them.
> I explain my problem.
> I have a menu implemented in a tree2 component. On the same time, on every
> page I have a next and back buttons. When the user press the "next" button,
> for example, she should see in the tree (menu) the next item selected.
> But I can select one item based on the id (path), e.q. "0:2:3". Only I build
> this tree based on some conditions and sometimes one node has the id "0:2:3"
> and in other conditions "0:3:3".
>
> For this reason I want to have the entire tree but some items to be
> invisible.
>
> If you know a good solution please let me know
> --
> View this message in context: http://www.nabble.com/Set-a-node-invisible-in-tree2-tp23211324p23292512.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: Set a node invisible in tree2

Posted by mitroiasi <mi...@yahoo.com>.


Hallo Georg,

Thank you for your reply.
But I want to set the invisible, not to delete them.
I explain my problem.
I have a menu implemented in a tree2 component. On the same time, on every
page I have a next and back buttons. When the user press the "next" button,
for example, she should see in the tree (menu) the next item selected.
But I can select one item based on the id (path), e.q. "0:2:3". Only I build
this tree based on some conditions and sometimes one node has the id "0:2:3"
and in other conditions "0:3:3".

For this reason I want to have the entire tree but some items to be
invisible.

If you know a good solution please let me know
-- 
View this message in context: http://www.nabble.com/Set-a-node-invisible-in-tree2-tp23211324p23292512.html
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Set a node invisible in tree2

Posted by Georg Füchsle <gi...@googlemail.com>.
Hallo,


when processing the action you can delete your node serverside. This
should be the easiest way.

If you want to show/hide the node by Javascript it will be more work.
You have to look at the produced html-Code to find the ids of the <td>
that corresponds to your node and hide it by Javascript. but actually
I didn't try this...

cheers,

Georg


2009/4/24 mitroiasi <mi...@yahoo.com>:
>
>
> Hi,
>
> I want to set a node invisible in a tree2 component.
> I didn't find any proper method to do this.
> Is it possible to implement this?
> If yes, how?
>
> Thank you
> --
> View this message in context: http://www.nabble.com/Set-a-node-invisible-in-tree2-tp23211324p23211324.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>