You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Novin <no...@ml.com> on 2007/07/06 18:28:17 UTC

Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Hi Friends,

I am using serverside Tree2 with ajax and tiles.

My tree has 3 level excluding root node.

root
'         (Level-1)                  
-------Group name        (Level-2)
             '--------------Group number            (Level-3)
                                         '......................Accounts

Problem:1

when I click on grpName node it fetches & create the child grpnumber node,
but at the time of re-rendering the tree is not expaneded till
groupnumbers(child nodes), it show (+) image at grpname(parent node). Then
again I need to click on + to view the child.

I want the tree to be expanded till the childs how its possible
programatically?

Problem:2

When I click any of the node(every node click is ajax request), behind the
scene in my tree bean(which is in session) the data fetching logic works
fine and create and append the childnode to the parent to the treebean.  

then due to problem 1 i have again click on the + img and if child node are
more then 40 it take around 2minutes to referesh and reload tree. Wht i
found its look like Tile is taking lots of time in commiting the response.

Pls let me know the solution.

I am attaching the JSP file 
http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp 

thanks ...
Novin


 



-- 
View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Novin <no...@ml.com>.
Hi Andrew,

Ya I m already working with rechfaces demo tree. I will stick to Ajax only.

Thanks for all of your response.

You are a nice chap.

Have a great day! will bother you again if i will face any pronlem. :);

Regards,
Novin

Andrew Robinson-5 wrote:
> 
> The code is proprietary, so I cannot give it to you, but I didn't have
> to do much to get it working out of the box. So, the best place to
> look is at the rich faces demo on exadel's site for the tree.
> 
> http://livedemo.exadel.com/richfaces-demo/
> 
> If you don't want to use A4J, the trinidad and IceFaces products may
> have similar AJAX enabled trees.
> 
> On 7/9/07, Novin <no...@ml.com> wrote:
>>
>> Hi,
>>
>> Thanks for such prompt reply.
>>
>> Andrew even in my case i m not creating tree's all levels upfront.
>>
>> Onece page is loaded first time I create only the first level and on
>> click
>> of any node of any level I make DB call create the child nodes and append
>> it
>> to the parentnode.
>>
>> So you are suggesting go for richfaces tree in stead of tree2 bcas its
>> creating lots of html code at time of rerendering.
>>
>> Andrew if you have all ready implemented richfaces tree then can I have
>> ur
>> code for reference instead of reinventing the wheel bcas some time a
>> samll
>> problem take lots of time.
>>
>> Hope you understand my problem.
>>
>> Thanking you in davance.
>>
>> Novin
>>
>>
>>
>>
>> Andrew Robinson-5 wrote:
>> >
>> > In my approach, I used lazy loading of the model because we didn't
>> > have the nodes up front like you do. Getting the children of each
>> > folder was a database call with a lot of children, so getting the tree
>> > all up front would have been really bad for us.
>> >
>> > Slow rendering cannot be fixed if the tree is large without a lot of
>> > work. The slow rendering, I find, is due to a lot of HTML generated by
>> > the tree2 component.
>> >
>> > We ended up ditching tree2 for most of our trees and started using
>> > JBoss RichFaces tree with A4J to do the updating. Since it uses AJAX,
>> > it was much more suited for large trees and server-side node
>> > expansion. Only time that performance became a problem was for trees
>> > that were initially expanded.
>> >
>> > On 7/9/07, Novin <no...@ml.com> wrote:
>> >>
>> >> Hi Andrew,
>> >>
>> >> When I compare my code with your blog
>> >>
>> >> Currently wht I m doing:
>> >> I m using treebean which contanins a rootnode and when user click on
>> any
>> >> node I found the selected node and make an db call and add child node
>> to
>> >> that node programatically. and there is no role of treeModel in my
>> bean I
>> >> have just defined it as a reference variable.
>> >>
>> >> is this reason why my tree is loading slow.
>> >>
>> >> Your approach:
>> >>
>> >> If i will create a lazynode which will extend the TreeNode. and I will
>> >> use
>> >> this lazyNode as refernce variable in the treebean and will override
>> the
>> >> loadChildren() method of lazynode ( which will call db and get the
>> list
>> >> of
>> >> the child node and set it). This will solve my problem of slow
>> >> rerendering
>> >> of tree.
>> >>
>> >> I am attaching the my treebean with this code.
>> >>
>> >> One more thing which I want to bring in ur notice is that I m using
>> >> treeData
>> >> instead of treeModel to load the tree. Will this lead to any issue
>> >> related
>> >> to slow rerendering of the tree.
>> >>
>> >> <t:tree2 id="clientTree" value="#{accountTreeBean.treeData}"
>> var="node"
>> >> varNodeToggler="t"
>> >>                                 clientSideToggle="false">
>> >>
>> >>
>> >> http://www.nabble.com/file/p11504455/AccountTreeBean.java
>> >> AccountTreeBean.java
>> >>
>> >> Hope I m not bothering you much!
>> >>
>> >> Thanks
>> >> Novin
>> >>
>> >>
>> >>
>> >> Andrew Robinson-5 wrote:
>> >> >
>> >> > Have you read my blog?
>> >> >
>> >> >
>> >>
>> http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html
>> >> >
>> >> > Or read the wiki?
>> >> >
>> >> > http://wiki.apache.org/myfaces/Tree2
>> >> >
>> >> > -Andrew
>> >> >
>> >> >
>> >> > On 7/6/07, Novin <no...@ml.com> wrote:
>> >> >>
>> >> >> Hi Friends,
>> >> >>
>> >> >> I am using serverside Tree2 with ajax and tiles.
>> >> >>
>> >> >> My tree has 3 level excluding root node.
>> >> >>
>> >> >> root
>> >> >> '         (Level-1)
>> >> >> -------Group name        (Level-2)
>> >> >>              '--------------Group number            (Level-3)
>> >> >>
>> >> '......................Accounts
>> >> >>
>> >> >> Problem:1
>> >> >>
>> >> >> when I click on grpName node it fetches & create the child
>> grpnumber
>> >> >> node,
>> >> >> but at the time of re-rendering the tree is not expaneded till
>> >> >> groupnumbers(child nodes), it show (+) image at grpname(parent
>> node).
>> >> >> Then
>> >> >> again I need to click on + to view the child.
>> >> >>
>> >> >> I want the tree to be expanded till the childs how its possible
>> >> >> programatically?
>> >> >>
>> >> >> Problem:2
>> >> >>
>> >> >> When I click any of the node(every node click is ajax request),
>> behind
>> >> >> the
>> >> >> scene in my tree bean(which is in session) the data fetching logic
>> >> works
>> >> >> fine and create and append the childnode to the parent to the
>> >> treebean.
>> >> >>
>> >> >> then due to problem 1 i have again click on the + img and if child
>> >> node
>> >> >> are
>> >> >> more then 40 it take around 2minutes to referesh and reload tree.
>> Wht
>> >> i
>> >> >> found its look like Tile is taking lots of time in commiting the
>> >> >> response.
>> >> >>
>> >> >> Pls let me know the solution.
>> >> >>
>> >> >> I am attaching the JSP file
>> >> >> http://www.nabble.com/file/p11468451/accountTree.jsp
>> accountTree.jsp
>> >> >>
>> >> >> thanks ...
>> >> >> Novin
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
>> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11504455
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11505036
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11506389
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Andrew Robinson <an...@gmail.com>.
The code is proprietary, so I cannot give it to you, but I didn't have
to do much to get it working out of the box. So, the best place to
look is at the rich faces demo on exadel's site for the tree.

http://livedemo.exadel.com/richfaces-demo/

If you don't want to use A4J, the trinidad and IceFaces products may
have similar AJAX enabled trees.

On 7/9/07, Novin <no...@ml.com> wrote:
>
> Hi,
>
> Thanks for such prompt reply.
>
> Andrew even in my case i m not creating tree's all levels upfront.
>
> Onece page is loaded first time I create only the first level and on click
> of any node of any level I make DB call create the child nodes and append it
> to the parentnode.
>
> So you are suggesting go for richfaces tree in stead of tree2 bcas its
> creating lots of html code at time of rerendering.
>
> Andrew if you have all ready implemented richfaces tree then can I have ur
> code for reference instead of reinventing the wheel bcas some time a samll
> problem take lots of time.
>
> Hope you understand my problem.
>
> Thanking you in davance.
>
> Novin
>
>
>
>
> Andrew Robinson-5 wrote:
> >
> > In my approach, I used lazy loading of the model because we didn't
> > have the nodes up front like you do. Getting the children of each
> > folder was a database call with a lot of children, so getting the tree
> > all up front would have been really bad for us.
> >
> > Slow rendering cannot be fixed if the tree is large without a lot of
> > work. The slow rendering, I find, is due to a lot of HTML generated by
> > the tree2 component.
> >
> > We ended up ditching tree2 for most of our trees and started using
> > JBoss RichFaces tree with A4J to do the updating. Since it uses AJAX,
> > it was much more suited for large trees and server-side node
> > expansion. Only time that performance became a problem was for trees
> > that were initially expanded.
> >
> > On 7/9/07, Novin <no...@ml.com> wrote:
> >>
> >> Hi Andrew,
> >>
> >> When I compare my code with your blog
> >>
> >> Currently wht I m doing:
> >> I m using treebean which contanins a rootnode and when user click on any
> >> node I found the selected node and make an db call and add child node to
> >> that node programatically. and there is no role of treeModel in my bean I
> >> have just defined it as a reference variable.
> >>
> >> is this reason why my tree is loading slow.
> >>
> >> Your approach:
> >>
> >> If i will create a lazynode which will extend the TreeNode. and I will
> >> use
> >> this lazyNode as refernce variable in the treebean and will override the
> >> loadChildren() method of lazynode ( which will call db and get the list
> >> of
> >> the child node and set it). This will solve my problem of slow
> >> rerendering
> >> of tree.
> >>
> >> I am attaching the my treebean with this code.
> >>
> >> One more thing which I want to bring in ur notice is that I m using
> >> treeData
> >> instead of treeModel to load the tree. Will this lead to any issue
> >> related
> >> to slow rerendering of the tree.
> >>
> >> <t:tree2 id="clientTree" value="#{accountTreeBean.treeData}" var="node"
> >> varNodeToggler="t"
> >>                                 clientSideToggle="false">
> >>
> >>
> >> http://www.nabble.com/file/p11504455/AccountTreeBean.java
> >> AccountTreeBean.java
> >>
> >> Hope I m not bothering you much!
> >>
> >> Thanks
> >> Novin
> >>
> >>
> >>
> >> Andrew Robinson-5 wrote:
> >> >
> >> > Have you read my blog?
> >> >
> >> >
> >> http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html
> >> >
> >> > Or read the wiki?
> >> >
> >> > http://wiki.apache.org/myfaces/Tree2
> >> >
> >> > -Andrew
> >> >
> >> >
> >> > On 7/6/07, Novin <no...@ml.com> wrote:
> >> >>
> >> >> Hi Friends,
> >> >>
> >> >> I am using serverside Tree2 with ajax and tiles.
> >> >>
> >> >> My tree has 3 level excluding root node.
> >> >>
> >> >> root
> >> >> '         (Level-1)
> >> >> -------Group name        (Level-2)
> >> >>              '--------------Group number            (Level-3)
> >> >>
> >> '......................Accounts
> >> >>
> >> >> Problem:1
> >> >>
> >> >> when I click on grpName node it fetches & create the child grpnumber
> >> >> node,
> >> >> but at the time of re-rendering the tree is not expaneded till
> >> >> groupnumbers(child nodes), it show (+) image at grpname(parent node).
> >> >> Then
> >> >> again I need to click on + to view the child.
> >> >>
> >> >> I want the tree to be expanded till the childs how its possible
> >> >> programatically?
> >> >>
> >> >> Problem:2
> >> >>
> >> >> When I click any of the node(every node click is ajax request), behind
> >> >> the
> >> >> scene in my tree bean(which is in session) the data fetching logic
> >> works
> >> >> fine and create and append the childnode to the parent to the
> >> treebean.
> >> >>
> >> >> then due to problem 1 i have again click on the + img and if child
> >> node
> >> >> are
> >> >> more then 40 it take around 2minutes to referesh and reload tree. Wht
> >> i
> >> >> found its look like Tile is taking lots of time in commiting the
> >> >> response.
> >> >>
> >> >> Pls let me know the solution.
> >> >>
> >> >> I am attaching the JSP file
> >> >> http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp
> >> >>
> >> >> thanks ...
> >> >> Novin
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
> >> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11504455
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11505036
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Novin <no...@ml.com>.
Hi,

Thanks for such prompt reply.

Andrew even in my case i m not creating tree's all levels upfront.

Onece page is loaded first time I create only the first level and on click
of any node of any level I make DB call create the child nodes and append it
to the parentnode.

So you are suggesting go for richfaces tree in stead of tree2 bcas its
creating lots of html code at time of rerendering.

Andrew if you have all ready implemented richfaces tree then can I have ur
code for reference instead of reinventing the wheel bcas some time a samll
problem take lots of time.

Hope you understand my problem.

Thanking you in davance.

Novin




Andrew Robinson-5 wrote:
> 
> In my approach, I used lazy loading of the model because we didn't
> have the nodes up front like you do. Getting the children of each
> folder was a database call with a lot of children, so getting the tree
> all up front would have been really bad for us.
> 
> Slow rendering cannot be fixed if the tree is large without a lot of
> work. The slow rendering, I find, is due to a lot of HTML generated by
> the tree2 component.
> 
> We ended up ditching tree2 for most of our trees and started using
> JBoss RichFaces tree with A4J to do the updating. Since it uses AJAX,
> it was much more suited for large trees and server-side node
> expansion. Only time that performance became a problem was for trees
> that were initially expanded.
> 
> On 7/9/07, Novin <no...@ml.com> wrote:
>>
>> Hi Andrew,
>>
>> When I compare my code with your blog
>>
>> Currently wht I m doing:
>> I m using treebean which contanins a rootnode and when user click on any
>> node I found the selected node and make an db call and add child node to
>> that node programatically. and there is no role of treeModel in my bean I
>> have just defined it as a reference variable.
>>
>> is this reason why my tree is loading slow.
>>
>> Your approach:
>>
>> If i will create a lazynode which will extend the TreeNode. and I will
>> use
>> this lazyNode as refernce variable in the treebean and will override the
>> loadChildren() method of lazynode ( which will call db and get the list
>> of
>> the child node and set it). This will solve my problem of slow
>> rerendering
>> of tree.
>>
>> I am attaching the my treebean with this code.
>>
>> One more thing which I want to bring in ur notice is that I m using
>> treeData
>> instead of treeModel to load the tree. Will this lead to any issue
>> related
>> to slow rerendering of the tree.
>>
>> <t:tree2 id="clientTree" value="#{accountTreeBean.treeData}" var="node"
>> varNodeToggler="t"
>>                                 clientSideToggle="false">
>>
>>
>> http://www.nabble.com/file/p11504455/AccountTreeBean.java
>> AccountTreeBean.java
>>
>> Hope I m not bothering you much!
>>
>> Thanks
>> Novin
>>
>>
>>
>> Andrew Robinson-5 wrote:
>> >
>> > Have you read my blog?
>> >
>> >
>> http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html
>> >
>> > Or read the wiki?
>> >
>> > http://wiki.apache.org/myfaces/Tree2
>> >
>> > -Andrew
>> >
>> >
>> > On 7/6/07, Novin <no...@ml.com> wrote:
>> >>
>> >> Hi Friends,
>> >>
>> >> I am using serverside Tree2 with ajax and tiles.
>> >>
>> >> My tree has 3 level excluding root node.
>> >>
>> >> root
>> >> '         (Level-1)
>> >> -------Group name        (Level-2)
>> >>              '--------------Group number            (Level-3)
>> >>                                         
>> '......................Accounts
>> >>
>> >> Problem:1
>> >>
>> >> when I click on grpName node it fetches & create the child grpnumber
>> >> node,
>> >> but at the time of re-rendering the tree is not expaneded till
>> >> groupnumbers(child nodes), it show (+) image at grpname(parent node).
>> >> Then
>> >> again I need to click on + to view the child.
>> >>
>> >> I want the tree to be expanded till the childs how its possible
>> >> programatically?
>> >>
>> >> Problem:2
>> >>
>> >> When I click any of the node(every node click is ajax request), behind
>> >> the
>> >> scene in my tree bean(which is in session) the data fetching logic
>> works
>> >> fine and create and append the childnode to the parent to the
>> treebean.
>> >>
>> >> then due to problem 1 i have again click on the + img and if child
>> node
>> >> are
>> >> more then 40 it take around 2minutes to referesh and reload tree. Wht
>> i
>> >> found its look like Tile is taking lots of time in commiting the
>> >> response.
>> >>
>> >> Pls let me know the solution.
>> >>
>> >> I am attaching the JSP file
>> >> http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp
>> >>
>> >> thanks ...
>> >> Novin
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
>> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11504455
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11505036
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Andrew Robinson <an...@gmail.com>.
In my approach, I used lazy loading of the model because we didn't
have the nodes up front like you do. Getting the children of each
folder was a database call with a lot of children, so getting the tree
all up front would have been really bad for us.

Slow rendering cannot be fixed if the tree is large without a lot of
work. The slow rendering, I find, is due to a lot of HTML generated by
the tree2 component.

We ended up ditching tree2 for most of our trees and started using
JBoss RichFaces tree with A4J to do the updating. Since it uses AJAX,
it was much more suited for large trees and server-side node
expansion. Only time that performance became a problem was for trees
that were initially expanded.

On 7/9/07, Novin <no...@ml.com> wrote:
>
> Hi Andrew,
>
> When I compare my code with your blog
>
> Currently wht I m doing:
> I m using treebean which contanins a rootnode and when user click on any
> node I found the selected node and make an db call and add child node to
> that node programatically. and there is no role of treeModel in my bean I
> have just defined it as a reference variable.
>
> is this reason why my tree is loading slow.
>
> Your approach:
>
> If i will create a lazynode which will extend the TreeNode. and I will use
> this lazyNode as refernce variable in the treebean and will override the
> loadChildren() method of lazynode ( which will call db and get the list of
> the child node and set it). This will solve my problem of slow rerendering
> of tree.
>
> I am attaching the my treebean with this code.
>
> One more thing which I want to bring in ur notice is that I m using treeData
> instead of treeModel to load the tree. Will this lead to any issue related
> to slow rerendering of the tree.
>
> <t:tree2 id="clientTree" value="#{accountTreeBean.treeData}" var="node"
> varNodeToggler="t"
>                                 clientSideToggle="false">
>
>
> http://www.nabble.com/file/p11504455/AccountTreeBean.java
> AccountTreeBean.java
>
> Hope I m not bothering you much!
>
> Thanks
> Novin
>
>
>
> Andrew Robinson-5 wrote:
> >
> > Have you read my blog?
> >
> > http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html
> >
> > Or read the wiki?
> >
> > http://wiki.apache.org/myfaces/Tree2
> >
> > -Andrew
> >
> >
> > On 7/6/07, Novin <no...@ml.com> wrote:
> >>
> >> Hi Friends,
> >>
> >> I am using serverside Tree2 with ajax and tiles.
> >>
> >> My tree has 3 level excluding root node.
> >>
> >> root
> >> '         (Level-1)
> >> -------Group name        (Level-2)
> >>              '--------------Group number            (Level-3)
> >>                                          '......................Accounts
> >>
> >> Problem:1
> >>
> >> when I click on grpName node it fetches & create the child grpnumber
> >> node,
> >> but at the time of re-rendering the tree is not expaneded till
> >> groupnumbers(child nodes), it show (+) image at grpname(parent node).
> >> Then
> >> again I need to click on + to view the child.
> >>
> >> I want the tree to be expanded till the childs how its possible
> >> programatically?
> >>
> >> Problem:2
> >>
> >> When I click any of the node(every node click is ajax request), behind
> >> the
> >> scene in my tree bean(which is in session) the data fetching logic works
> >> fine and create and append the childnode to the parent to the treebean.
> >>
> >> then due to problem 1 i have again click on the + img and if child node
> >> are
> >> more then 40 it take around 2minutes to referesh and reload tree. Wht i
> >> found its look like Tile is taking lots of time in commiting the
> >> response.
> >>
> >> Pls let me know the solution.
> >>
> >> I am attaching the JSP file
> >> http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp
> >>
> >> thanks ...
> >> Novin
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
> >> Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >>
> >>
> >
> >
>
> --
> View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11504455
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>

Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Novin <no...@ml.com>.
Hi Andrew,

When I compare my code with your blog 

Currently wht I m doing:
I m using treebean which contanins a rootnode and when user click on any
node I found the selected node and make an db call and add child node to
that node programatically. and there is no role of treeModel in my bean I
have just defined it as a reference variable.

is this reason why my tree is loading slow.

Your approach:

If i will create a lazynode which will extend the TreeNode. and I will use
this lazyNode as refernce variable in the treebean and will override the
loadChildren() method of lazynode ( which will call db and get the list of
the child node and set it). This will solve my problem of slow rerendering
of tree.

I am attaching the my treebean with this code.

One more thing which I want to bring in ur notice is that I m using treeData
instead of treeModel to load the tree. Will this lead to any issue related
to slow rerendering of the tree.

<t:tree2 id="clientTree" value="#{accountTreeBean.treeData}" var="node"
varNodeToggler="t" 
			    	clientSideToggle="false">


http://www.nabble.com/file/p11504455/AccountTreeBean.java
AccountTreeBean.java 

Hope I m not bothering you much!

Thanks 
Novin



Andrew Robinson-5 wrote:
> 
> Have you read my blog?
> 
> http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html
> 
> Or read the wiki?
> 
> http://wiki.apache.org/myfaces/Tree2
> 
> -Andrew
> 
> 
> On 7/6/07, Novin <no...@ml.com> wrote:
>>
>> Hi Friends,
>>
>> I am using serverside Tree2 with ajax and tiles.
>>
>> My tree has 3 level excluding root node.
>>
>> root
>> '         (Level-1)
>> -------Group name        (Level-2)
>>              '--------------Group number            (Level-3)
>>                                          '......................Accounts
>>
>> Problem:1
>>
>> when I click on grpName node it fetches & create the child grpnumber
>> node,
>> but at the time of re-rendering the tree is not expaneded till
>> groupnumbers(child nodes), it show (+) image at grpname(parent node).
>> Then
>> again I need to click on + to view the child.
>>
>> I want the tree to be expanded till the childs how its possible
>> programatically?
>>
>> Problem:2
>>
>> When I click any of the node(every node click is ajax request), behind
>> the
>> scene in my tree bean(which is in session) the data fetching logic works
>> fine and create and append the childnode to the parent to the treebean.
>>
>> then due to problem 1 i have again click on the + img and if child node
>> are
>> more then 40 it take around 2minutes to referesh and reload tree. Wht i
>> found its look like Tile is taking lots of time in commiting the
>> response.
>>
>> Pls let me know the solution.
>>
>> I am attaching the JSP file
>> http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp
>>
>> thanks ...
>> Novin
>>
>>
>>
>>
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
>> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11504455
Sent from the MyFaces - Users mailing list archive at Nabble.com.


Re: Tree2: Serverside-Tree rerendering is very slow in with Tiles. Pls help

Posted by Andrew Robinson <an...@gmail.com>.
Have you read my blog?

http://andrewfacelets.blogspot.com/2006/06/myfaces-tree2-creating-lazy-loading.html

Or read the wiki?

http://wiki.apache.org/myfaces/Tree2

-Andrew


On 7/6/07, Novin <no...@ml.com> wrote:
>
> Hi Friends,
>
> I am using serverside Tree2 with ajax and tiles.
>
> My tree has 3 level excluding root node.
>
> root
> '         (Level-1)
> -------Group name        (Level-2)
>              '--------------Group number            (Level-3)
>                                          '......................Accounts
>
> Problem:1
>
> when I click on grpName node it fetches & create the child grpnumber node,
> but at the time of re-rendering the tree is not expaneded till
> groupnumbers(child nodes), it show (+) image at grpname(parent node). Then
> again I need to click on + to view the child.
>
> I want the tree to be expanded till the childs how its possible
> programatically?
>
> Problem:2
>
> When I click any of the node(every node click is ajax request), behind the
> scene in my tree bean(which is in session) the data fetching logic works
> fine and create and append the childnode to the parent to the treebean.
>
> then due to problem 1 i have again click on the + img and if child node are
> more then 40 it take around 2minutes to referesh and reload tree. Wht i
> found its look like Tile is taking lots of time in commiting the response.
>
> Pls let me know the solution.
>
> I am attaching the JSP file
> http://www.nabble.com/file/p11468451/accountTree.jsp accountTree.jsp
>
> thanks ...
> Novin
>
>
>
>
>
>
> --
> View this message in context: http://www.nabble.com/Tree2%3A-Serverside-Tree-rerendering-is-very-slow-in-with-Tiles.-Pls-help-tf4036770.html#a11468451
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>
>