Projects/Tree Extension/Functional Specifications
Contents |
Tree Extension Project - Functional Specifications
Overview
The purpose of this project is to:
- Allow external modules to define tree tables without changing the core module.
- Change the UI of the tree windows, so that it uses smartclient instead of a manual popup.
- Create a new reference that takes advantage of the hierarchical data of the tree tables.
- Allow to define custom trees that do not match the two current default tree structures (ADTreeNode and LinkToParent).
Definition of Tree Tables
When a user defines a table whose content can be displayed hierarchically, the user has to:
- Define a Tree Category. A tree category defines the basic behaviour of the tree:
- Name
- Tree Structure:
- ADTreeNode if the information about the nodes hierarchy want to be stored in the AD_Tree and AD_TreeNode tables.
- Link To Parent if the hierarchy information if stored in the own table (each register is a node, and there is a column that points to the parent node).
- Custom for other table trees
- Is Ordered. If the position of a node among its sibling nodes matter this flag has to be checked.
- Is Parent Selection Allowed: If non leaves nodes (also known as summary nodes) can be selected in a reference that points to a tree table the uses this tree category, this flag has to be checked.
- Associate the Tree Category with the Tree Table:
- The user has to check the Is Tree flag in the header tab of the Tables and Columns window, in order to make the Table Tree Category subtab.
- The user has to add a new record in the Table Tree Category subtab and enter the following information:
- Tree Category. If the tree category entered here uses the Link To Parent tree structure, the user also has to enter:
- Link To Parent Column: The column that points to the parent node.
- Node ID Column: The column that represents the node ID (usually the primary key column)
- Has Multiparent Nodes: If the data stored in this table is not strictly a tree because each node has several parent nodes, this flag needs to be checked.
Associating a Tree Table with a Tree Category will enable to display the Tree Grid View in the tab based on that table and to use the Tree Reference.
Tree Grid View
An alternate grid view is available for tree tables. In order to enable the tree grid view in a tab, the user has to enter a Table Tree Category in the Tab tab of the Windows, Tabs and Fields window. In that field all the Table Trees defined for the table associated with the tab are listed.
Once this has been set a new toolbar button titled "Toggle Tree Grid Visibility" will be available in the tab. Pressing this button when the view grid is visible will show the tree grid view.
The tree grid view allows to explore the content of the table hierarchically.
- If there are no filters set, at first only the root nodes will be displayed. Clicking on the + button of a node will show its child nodes.
- If the grid filters are used on this view, the filtered records along with all its node ancestors will be shown.
If the tab is not read only, the user will be able to change the parent of the nodes using the tree grid view.
Double clicking a record on a tree grid view will display it in form view.
Tree Reference
The Tree Refence will take advantage of the hierarchical data of the tables it is based on. It will include the following UI components:
- Tree Filter. For filtering fields based on this reference, the user can use a popup where he will be able to navigate the data hierarchically, and select the nodes that need to be included in the filter
- Tree Item. The tree item is composed of:
- A text item, where the selected value is shown.
- A small tree grid that will be shown beside the text item. Here the user will be able to navigate the data hierarchically. If the user enters some text in the text item, a filter request will be done and the results will be showed in this tree.
- A tree popup. A popup that will show a grid. This grid is able to show and filter several columns. Double clicking on a record on this popup will select the record in the form item.
Custom Trees
If the user defines a table that stores hierarchical content but he does not want to use the ADTreeNode or the Link To Parent tree structures, he will be able to define his hown tree structure.
To do this, the user has to create a new Custom Tree Category, and enter the Datasource field. Here the user will have to define a new Datasource that extends the Tree Datasource Service.