myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hansjörg Meuschel <hj...@gmx.de>
Subject tree2 - onclick node description expand/collapse node
Date Sun, 11 Dec 2005 20:17:54 GMT
Hi,
a simple question about the tree2: what action do I have to call to 
toggle the expand state of a tree node when clicking on the treenode 
description

I have something like
                            <t:tree2 binding="#{targetsTreeBaker.tree}" 
value="#{targetsTreeBaker.expandedTreeData}"  clientSideToggle="false" 
var="node" varNodeToggler="t">
                                <f:facet name="figure-folder">
                                    <h:panelGrid columns="2" cellpadding="2"
                                        cellspacing="0">
                                        <t:graphicImage 
value="/images/yellow-folder-open.png"
                                            rendered="#{t.nodeExpanded}" 
border="0" />
                                        <t:graphicImage 
value="/images/yellow-folder-closed.png"
                                            
rendered="#{!t.nodeExpanded}" border="0" />

The following link should toggle the status of its children.

                                        <h:commandLink immediate="true" 
styleClass="r12000000" >
                                                <h:outputText 
style="white-space:nowrap" rendered="#{node.bold == null}" 
value="#{node.description}" />
                                                <h:outputText 
style="white-space:nowrap;font-weight:bold" rendered="#{node.bold != 
null}" value="#{node.description}(#{node.bold})" />
                                        </h:commandLink>
                                    </h:panelGrid>
                                </f:facet>

I tried using the nodetoggler but without success - seems that the 
toggler stores the toggle state of the node only, it's not changeable??
Thanks for any help!

Mime
View raw message