You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Michal Glowacki <mg...@projektpro.internetdsl.pl> on 2007/02/24 10:42:33 UTC

ajaxed Tree2 - content loaded twice when showRootNode=true

Hi

    I've 'ajaxed' tree2 component using a4j component library (commandLinks + outputPanel). What I've discovered, is that when is set attribute showRootNode to truel the children of root node are displayed twice. I've checked why - that's because first getTreeModel is invoked and then loadChildren. Can anybody give me a hint how to avoid it?

    Thanks in advance,
Michal

Re: ajaxed Tree2 - content loaded twice when showRootNode=true

Posted by Adrian Mitev <ad...@googlemail.com>.
Hi! I've developed custom ajax dataScroller on the base of t:dataScroller
and found out that In the original t:dataScroller the inner components
(commandLInks for the scroller) are transient (they're not saved in the
tree). To make it working on each request i reset  the childs of my
component and recreate them again from the new values. This way  i've
skipped duplicate ID problem and the childs to be created more than once.
Sample code you could find here [1].

[1]
https://ajax4jsf.dev.java.net/servlets/ProjectDocumentList?folderID=6510&expandFolder=6510&folderID=0

2007/2/24, Michal Glowacki <mg...@projektpro.internetdsl.pl>:
>
>  Hi
>
>     I've 'ajaxed' tree2 component using a4j component library
> (commandLinks + outputPanel). What I've discovered, is that when is set
> attribute showRootNode to truel the children of root node are displayed
> twice. I've checked why - that's because first getTreeModel is invoked and
> then loadChildren. Can anybody give me a hint how to avoid it?
>
>     Thanks in advance,
> Michal
>