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 <[EMAIL PROTECTED]> 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.

Reply via email to