Hi,

now it seems to work.. i just changed the minus and plus icon in the t:graphicImage component and
I set rendered to true..... strange...
But could you please explane to me what this " rendered=#{!node.leaf} " is actually working???

Cheers!


Wolfgang schrieb:
Hi,

thanks for this greate page! I guess it is really a good solution, but it does not work ;) The first problem I have is that the plus and minus icon ist not shown because of the rendered="#{!node.leaf}". If is set this to true the minus icon appears, but it is not clickable. Furthermore I had to change the processToggle method a bit because I do not use the standard TreeNodeBase node. I guess this should work, but I can't test it because there's no icon to click. I do not really understand how that rendered stuff is working and I can't find something with "leaf"
in the java code.

So maybe you can have a quick look at the code: http://nopaste.php-quake.net/14631
It is actually exactly the same as in the example...

Heres my bean: http://nopaste.php-quake.net/14633

Thanks in advance!
Wolfgang

[EMAIL PROTECTED] schrieb:
I followed that same example. Basically you need to disable the +/- generated by tomahawk and use your own. Which is what Bill does in his example. In your command link, or ajax link use t.toggleExpanded for the action and then have an actionListener call toggle(ActionEvent e) to load the children.

-----Message d'origine-----
De : Georg Füchsle [mailto:[EMAIL PROTECTED] Envoyé : mardi 15 janvier 2008 12:18
À : 'MyFaces Discussion'
Objet : AW: Action behind plus/minus icon tree2 tomahawk

Hallo!


I think you can do so using ajax4jsf.

There is an example here: http://www.jroller.com/plainoldweblog/entry/use_tomahawk_tree2_and_ajax4jsf

I used this and it worked fine.

When toggling the Items the method public void processToggle(ActionEvent
p_event) is called and there is the possibility to dynamically build the
tree data. (In the example the functions loadChildren(node); and unloadChildren(node);)


Georg

-----Ursprüngliche Nachricht-----
Von: Wolfgang [mailto:[EMAIL PROTECTED] Gesendet: Dienstag, 15. Januar 2008 10:52
An: MyFaces Discussion
Betreff: Action behind plus/minus icon tree2 tomahawk

Hi,

does anyone know if there is a possibility to put an action
behind the plus/minus (expand/collapse) icon in a tomahawk tree2?
What I want is to execute a method which adds some more children to the tree
by clicking the plus icon....

Thanks a lot!
Wolfgang






__________________________________________________
safir-Wirtschaftsinformationsdienst GmbH
Möllendorffstr. 49
10367 Berlin
Tel.: ++49 30 577981 - 0
Fax: ++49 30 577981 - 18
E-Mail: [EMAIL PROTECTED]
Internet: www.safir-wid.de

Handelsregister: Amtsgericht Charlottenburg HRB 66681
USt-ID: DE 193584747
Geschäftsführer: Thilo Kind


Reply via email to