DataPanelLeaf
The data panel controllers are the ones that display record data linked to a ViewTable (see DataView). They share one abstract base class, TKXDataPanelController, and split in two families, as in Kitto1:
- the host (
TKXDataPanelCompositeController): the List. It owns the list of data (filter panel, action flags, lookup context) and composes the presenters that show it in its regions. - the presenters, or leaves (
TKXDataPanelLeafController): each shows the same data in one way. A presenter works on its own at the root of a view (aController: TemplateDataPanelwith its own filters and toolbar) or hosted in a region of a List, in which case it takes the filter expression, the actions and the list-level options from the host.
You never use the base classes directly — you use one of the concrete controllers.
Class hierarchy
As a Panel, every data panel inherits the common panel properties (Title, IsModal, Maximized, AllowClose, Width, Height, Collapsible, etc.) and the border regions (NorthController, WestController, ...).
The controllers
| Controller | Role | Description |
|---|---|---|
| List | host | Filters, actions and regions; the grid in its Center by default |
| GridPanel | presenter | Tabular data grid with sorting, column layouts, row colors |
| GroupingList | presenter | A GridPanel with collapsible group headers |
| TemplateDataPanel | presenter | Custom HTML templates for read-only display |
| ChartPanel | presenter | Chart.js charts (bar, line, pie, doughnut) |
| CalendarPanel | presenter | Events on a month/week/day calendar |
| Form | presenter | The current record, in a dialog or hosted beside the grid |
Common features
All data panels share these capabilities:
ToolViews
Custom action buttons on the controller's toolbar. Each ToolView launches a Tool controller:
MainTable:
Controller:
ToolViews:
ExportCSV:
DisplayLabel: Export to CSV
ImageName: download
Controller: ExportCSVTool
RequireSelection: FalseRequireSelection controls whether the button requires a selected row (True) or is always enabled (False).
Standard actions
Data panels support the standard CRUD operations Add, Duplicate, Edit, Delete, View, Refresh. Which of them a presenter offers is decided by the host from its flags (PreventAdding, AllowViewing, ... at the List level or under MainTable/Controller), the view table's read-only state and the user's permissions; a presenter then narrows them to what it can show (a chart has no actions, a calendar has no Duplicate). See Standard actions.
The toolbar buttons appear in this order: Add, Duplicate, Edit, Delete, View, Refresh, then any custom ToolViews.
AutoOpen and PagingTools
| Property | Type | Default | Description |
|---|---|---|---|
AutoOpen | Boolean | not IsLarge | Auto-load the data when the view opens. When False, the grid opens empty until the user applies a filter or clicks Refresh. |
PagingTools | Boolean | IsLarge | Show the pager bar (server-side pagination). Grid only. |
Both live under MainTable/Controller; see AutoOpen and PagingTools.
SortFieldNames
Defines the initial sort order for the data panel:
MainTable:
Model: ACTIVITY
Controller:
SortFieldNames: ACTIVITY_DATEMultiple fields can be specified separated by spaces (e.g. SortFieldNames: LAST_NAME FIRST_NAME).
DefaultFilter
A SQL WHERE clause applied automatically to restrict displayed records. Supports macros:
MainTable:
Model: MY_MODEL
DefaultFilter: STATUS = 'ACTIVE'