Welcome Guest, Not a member yet? Register   Sign In
How can i build a dynamic tree view using CodeIgniter ???

I am a freshers in CodeIgniter. Currently i am trying to build a Accounting software which will be WEB based. In this purpose i need some kind of "tree view" like in visual Basic. I dont find any help. Moreover, I think in next version of CodeIgniter PLEASE add some "component" like tree view, list view etc , so our programmers work can be minimal....

CodeIgniter is extendable with "libraries" and "helpers", so you could build a tree library or helper and contribute it back to the community so everyone benefits. Furthermore, you can use that library or helper in more of your sites without rewriting the code.

Got a concrete example of tree view you want? Please provide specific details.

[eluser]Yellow Duck[/eluser]
If you are referring to storing hierarchical data in the database, the following wiki page will help:





If you will write a library I suggest to manage the entire tree using a javascript tree menu.
You can find right and stable javascript tree menu around internet.....I will se if i will have time to write the library too.



check this out : http://phplayersmenu.sourceforge.net/
It is a PHP component so you can easily integrate into an application developed with CodeIgniter.


The Javascript EXT JS library can be used with Codigniter and it does include drag and drop grid and tree components. There is a dated article on the wiki about using EXT and CI together with the YUI adapter, but it is outdated. Better instructions and examples can be found on the EXT JS site. The use of the YUI adapter may not be necessary anymore depending on what you are trying to do because EXT JS has replaced many of its dependencies on YUI.

For an accounting application, it would be useful to have drag and drop features and EXT JS excels at this. Trees can be populated in a number of ways via database queries, query results cached as xml files, or using comma-delimited text. For an accounting application, it would be preferrable to take a dynamic approach using database query results to populate your trees. I have not seen any solutions there for populating a tree using nested sets, but believe there are several solutions for using the Adjacency List model (recursion with a parent_id column).

The EXT JS layouts part of the library plays very nicely with Coolfactor's proposed View library for CI. That is, you can disassemble a EXT JS layout and convert the containers to CI view partials.


You're going to experience a performance hit by including the full EXT JS library. But, it's possible to create a smaller library with only the components you need plus their dependencies from the download page. AI James' Cache library can be used to regain some performance loss, but in my tests Coolfactor's cache method worked just as well.

EXT JS 2.0 which is still under svn development and slated for release this fall creates a Windows-like windowing environment where multiple applications can run in separate windows. It's probably possible to create other windowing environments based on the default windowing environment. For a preview of this, look here:


If you include 'php' in your forum searches, it will reduce the number of hits you get when looking for information. There are a lot of PHP developers who frequent the site, but EXT JS is also used for Python, Ruby, .NET, Perl, etc.

EDIT: for the second link, use Firefox. IE7 does not show the minimized windows in the taskbar in the demo, but this was fixed in svn. Try loading windows, minimizing them, maximizing them, etc. The user interface closely mimics a desktop application.

Theme © iAndrew 2016 - Forum software by © MyBB