myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Matt.Rossner-pr...@sanofi-aventis.com>
Subject RE: Action behind plus/minus icon tree2 tomahawk
Date Tue, 15 Jan 2008 13:54:17 GMT
#{node.leaf} will return a boolean. If it returns true the component in question will be rendered,
else... not. 

Even if you're using your own TreeNode (as I'm sure most of us are), isLeaf is in the TreeNode
interface so your TreeNode must have this method. If the node is meant to be expandable then
it should return true.

-----Message d'origine-----
De : Wolfgang [mailto:wkluge@ebi.ac.uk] 
Envoyé : mardi 15 janvier 2008 13:45
À : MyFaces Discussion
Objet : Re: Action behind plus/minus icon tree2 tomahawk

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
>
> Matt.Rossner-prest@sanofi-aventis.com 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:g.fuechsle@safir-wid.de] 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:wkluge@ebi.ac.uk] 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: info@safir-wid.de
>> Internet: www.safir-wid.de
>>
>> Handelsregister: Amtsgericht Charlottenburg HRB 66681
>> USt-ID: DE 193584747
>> Geschäftsführer: Thilo Kind
>>
>>   


Mime
View raw message