What screen/widget/app for tree maintenance to use

0
Got a 4-level deep tree, A got several B's, who's got several C's, who's got several D's. And I need a maintenance screen for it. There are several option and currently I have created a datagrid-A, a listener to datagrid-A, containing a datagrid-B, a listener to datagrid-B, containing a datagrid-C, a listener to datagrid-C, containing a datagrid-D. Works, but it is not ideal. Since there are several options to choose from, I would like to know: What is the best solution (if any)?
asked
4 answers
1

Hey Tim,

Within Mendix we use the pattern of the closure table (e.g. https://coderwall.com/p/lixing/closure-tables-for-browsing-trees-in-sql) for this. You can just use a single list/grid and listener construction. Works like a charm and you can get the path (upwards) or the three with a single query.

answered
2

I don't think there is a 'best' solution for this, as it depends a lot of the kind of interactions the user is going to have with the objects.

So you need to find out what interactions you have (create new entries inline, delete items, move items around) and which information a user needs to see at once (only data of a single selected object, data of the whole path from A to D or a real tree like structure where you see multiple leafs from different sub-trees at once.

For a fixed-depth tree structure I think your initial approach is quite fine. The tree widgets mentioned by Austin are usually also a suitable choice if you don't have some special requirements - otherwise you could investigate in your own tree widget.

Another option I've seen is using non-persistant objects in a datagrid/templategrid with which you can mimic a tree structure - you need to build a lot of additional logic then, but you can do all your design stuff in the modeler.

answered
1

Hi Tim,

I've done that same approach when building a developer only screen. So probably not an ideal screen for users. You can also look into the treeview widgets in the app store.

https://appstore.home.mendix.com/link/app/294/Mendix/TreeView-and-GridView

https://appstore.home.mendix.com/link/app/38862/ITvisors/Tree-view-widget

https://appstore.home.mendix.com/link/app/1356/Synobsys/Bootstrap-TreeView-widget

answered
0

Ow, these are the answers I feared. Good useful answers but no clear winner app for a tree view. I will be sticking with the current setup, hoping to keep the number of bugs low, and meanwhile try out some of the options mentioned. Thanks guys.

answered