-
1. Re: Having problem with Tree control node selected event
nbelaevski Feb 13, 2009 7:21 PM (in response to scott1)Hello Scott,
Please add phase tracker: http://www.jsftutorials.net/faces-config/phaseTracker.html and post its log for different operations (e.g. rendering and selection) in order to see where the time is spent.
Tree requests from model only the data that is actually used. You can implement lazy-loading at TreeNode level, by implementing its methods in a proper way. -
2. Re: Having problem with Tree control node selected event
scott1 Feb 16, 2009 10:52 AM (in response to scott1)Hi.. Thanks for the reply. I download the phaselistener from the link that you provided and put it under WEB-INF/lib directory but I didn't see any logging. Also the file was a zip, not a jar. So I changed the extension to jar and it didn't do any logging for me. Actually I don't have any logging yet on my application and all my messages are output to the system console. Am I missing something here?
Also could you please send me any examples of lazy loading of tree node if you have any?
Thanks
Scott. -
3. Re: Having problem with Tree control node selected event
nbelaevski Feb 16, 2009 1:47 PM (in response to scott1)Here is the direct link to .jar file: http://www.jsftutorials.net/download/phaseTracker/phaseTracker.jar.
About lazy loading: you can implement this interface: org.richfaces.model.TreeNode or extend this class: org.richfaces.model.TreeNodeImpl and add lazy-loading functionality. Main methods to handle: getChild(), getChildren(), getParent(), isLeaf().
Method getData() can be implemented in the following way:public Object getData() {return this;}
-
4. Re: Having problem with Tree control node selected event
scott1 Feb 18, 2009 11:08 AM (in response to scott1)Hi,
For the slowness in the processSelection event handler, is there any solution? I even tested my tree with hard coded values. My test tree has 4 levels of nodes(around 2000 total nodes/trees). When I click on any node/leaf, it takes approximately one and half a minute to receive the nodeSelectedEvent in the processSelection method.
Does anyone noticed such a behavior? Is there any way to improve this?
Is there any benchmark result available that I can use to compare my tree performance? -
5. Re: Having problem with Tree control node selected event
scott1 Feb 18, 2009 12:02 PM (in response to scott1)Here is my phasetracker log dump..
11:47:04,019 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,128 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,128 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,128 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,269 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,269 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,269 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,269 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,331 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,331 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,331 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,331 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,347 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,347 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,347 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,347 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,362 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,362 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,362 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,362 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,378 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,378 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,378 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,378 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,409 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:47:04,409 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:47:04,409 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:47:04,409 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:47:04,409 ERROR [STDERR] Feb 18, 2009 11:47:04 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6
11:49:20,391 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RESTORE_VIEW 1
11:49:20,407 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RESTORE_VIEW 1
11:49:20,407 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE APPLY_REQUEST_VALUES 2
11:49:20,407 INFO [STDOUT] getTreeNode method called
11:49:20,688 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER APPLY_REQUEST_VALUES 2
11:49:20,688 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE PROCESS_VALIDATIONS 3
11:49:20,719 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER PROCESS_VALIDATIONS 3
11:49:20,719 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE UPDATE_MODEL_VALUES 4
11:49:20,782 INFO [STDOUT] Inside the processSelection event of tree bean:
11:49:20,782 INFO [STDOUT] The selected tree node is: LocationName0
11:49:20,782 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER UPDATE_MODEL_VALUES 4
11:49:20,782 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE INVOKE_APPLICATION 5
11:49:20,782 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER INVOKE_APPLICATION 5
11:49:20,782 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker beforePhase
INFO: BEFORE RENDER_RESPONSE 6
11:49:20,782 INFO [STDOUT] getTreeNode method called
11:49:20,829 ERROR [STDERR] Feb 18, 2009 11:49:20 AM org.exadel.jsf.PhaseTracker afterPhase
INFO: AFTER RENDER_RESPONSE 6 -
6. Re: Having problem with Tree control node selected event
scott1 Feb 19, 2009 5:11 PM (in response to scott1)hi guys,
any idea of how to solve this issue? I'm really struggling with the tree event processing performance. Would appreciate any help or insight .
Thanks. -
7. Re: Having problem with Tree control node selected event
nbelaevski Feb 20, 2009 11:58 AM (in response to scott1)I see that server processing takes less one second, so looks like problem on the client-side. Can you please create small example project demonstrating the issue?
-
8. Re: Having problem with Tree control node selected event
a.pradhan9049 Oct 7, 2010 12:28 PM (in response to scott1)Hi Scott , can post your code snippet , How you have load data into rich:tree from database.
Thanks
Ashu
-
9. Re: Having problem with Tree control node selected event
a.pradhan9049 Oct 14, 2010 12:57 PM (in response to scott1)Hi Scott , could tou please send me your code snippet because i got the requirment to loads data from database. I am not able to do the same.
Please Please send me the code.(Very very urgent for me)
Thank you very much
Thanks
Ashutosh
-
10. Re: Having problem with Tree control node selected event
a.pradhan9049 Oct 14, 2010 1:00 PM (in response to nbelaevski)Hi Nick,
Can you tell me , How to load data from databse into rich:tree(It's urgent my dear friend , Please help me). Wating for your reply
Thank you very much
Regard,
Ashutosh
-
11. Re: Having problem with Tree control node selected event
nbelaevski Oct 14, 2010 8:47 PM (in response to a.pradhan9049)Hi Ashutosh,
This is dependent on how tree data stored in DB. If it's stored as a nested sequence of lists, you can check these coomponents:
http://docs.jboss.org/richfaces/latest_3_3_X/en/tlddoc/rich/treeNodesAdaptor.html
http://docs.jboss.org/richfaces/latest_3_3_X/en/tlddoc/rich/recursiveTreeNodesAdaptor.html
-
12. Re: Having problem with Tree control node selected event
a.pradhan9049 Oct 18, 2010 2:27 AM (in response to nbelaevski)Hi Nick ,
Thank you
The links are helpful but I need some code snippet (Load data from database) with datamodel because I have to show the 5 level tree .Till now i am not able to load the data from database.
(It's urgent my dear friend , Please help me).
Thank you very much
Thanks,
Ashutosh