6 Apr 2010 3:40 AM #71
Remote Filter on Tree
Remote Filter on Tree
Recently I worked on a remote filter in the tree view.
Local filter (eg such as TreeFilterX) for asynchronous tree freezes the browser and take over all the CPU resources available.
My idea for the remote filtering is the following:
1. search all the items in the SQL table 'tree' pattern matching
2. search path for them
3. of these paths build a tree and give it as a result of filtering
Trick that still need to do, is change the parameters of the tree TreeLoader to add pattern to the query of filtered tree . The rest deals with server-side script (written in PHP for example) to handle the tree view.
If anyone of you is interested in the PHP implementation can be made available (currently I am in preparation for the demo of this solution.)
6 Apr 2010 3:42 AM #72
Would be interesting. Post it when you're done.
7 Apr 2010 6:44 AM #73
And Here is a demo of remote filtering on Tree. Just put 'remotetree.zip' in extjs examples directory and unzip. In SQL(MySQL) make table tree by this:PHP Code:
CREATE TABLE IF NOT EXISTS `tree` (
`id` int(11) NOT NULL auto_increment,
`pid` int(11) NOT NULL,
`text` varchar(255) collate utf8_bin default NULL,
`href` varchar(255) collate utf8_bin default NULL,
`iconCls` varchar(255) collate utf8_bin default NULL,
`icon` varchar(255) collate utf8_bin default NULL,
`disabled` tinyint(4) NOT NULL default '0',
`leaf` tinyint(4) NOT NULL default '0',
`expanded` tinyint(4) NOT NULL default '0',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
Don't forget to fullfill tree table some data to test wich method is the best - local or remote filtering.
Of course, in this implementation, there are many shortcomings because it was written as prototype but not for production environment.
By the way, where should I look for a class 'ctree'? It was used in 'proces-request.php' but this class not included in archive 'remotetree.zip' . Why?
7 Apr 2010 8:21 AM #74
Because ctree.php is proprietary software so I cannot publish it.
7 Apr 2010 11:02 PM #75
Thank You for reply. My first Idea was to build a tree from array that contains paths.
But this idea seems to be difficult to do by client side ( browser).
Server is much more quicker than client so imho this remote filter is a good for async tree with many nodes ( eg. over 2000) and levels.
Did You already tested demo? Any tips?
Off Topic question : Ctree class is a class for using with nested sets tree or other? Who is a author of this class and where ( website) can I found?
8 Apr 2010 3:44 AM #76
Sorry, I didn't have time to test it. I'm the author of ctree.
8 Apr 2010 10:32 PM #77
Thank you for your reply. I hope that a solution to the remote filtering trees will be useful.
8 Apr 2010 10:45 PM #78
I personally don't have such big trees at present but who knows...
5 Sep 2010 3:21 AM #79
Have there been any updates since V1.0? http://remotetree.extjs.eu
I've been trying to produce my own Filtered TreePanel for the last week (with partial success) however today came across your RemoteTree plug-in
Are there any known performance issues on the amount of data displayed? i.e. if I were to list 5000 items under 1 node, how would the plug-in perform?
Will definitely be making a donation once I've got it up and running.
Great work and thanks for saving me a huge amount of time and effort!
5 Sep 2010 6:19 AM #80
How about Paging Tree. There is on the forum snippet and user extention of paging Tree.
My solution for remote filter is for site those had a lot nodes ( parents and leafes). Recurection by client side depend on memory and CPU speed. In many cases, broser ( client side) will be hang 'cause computer resources is not enough to this task.
Have a nice day,