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