Skip to content

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 (a Controller: TemplateDataPanel with 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 ​

DataPanel controller 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 ​

ControllerRoleDescription
ListhostFilters, actions and regions; the grid in its Center by default
GridPanelpresenterTabular data grid with sorting, column layouts, row colors
GroupingListpresenterA GridPanel with collapsible group headers
TemplateDataPanelpresenterCustom HTML templates for read-only display
ChartPanelpresenterChart.js charts (bar, line, pie, doughnut)
CalendarPanelpresenterEvents on a month/week/day calendar
FormpresenterThe 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:

yaml
MainTable:
  Controller:
    ToolViews:
      ExportCSV:
        DisplayLabel: Export to CSV
        ImageName: download
        Controller: ExportCSVTool
          RequireSelection: False

RequireSelection 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 ​

PropertyTypeDefaultDescription
AutoOpenBooleannot IsLargeAuto-load the data when the view opens. When False, the grid opens empty until the user applies a filter or clicks Refresh.
PagingToolsBooleanIsLargeShow 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:

yaml
MainTable:
  Model: ACTIVITY
  Controller:
    SortFieldNames: ACTIVITY_DATE

Multiple 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:

yaml
MainTable:
  Model: MY_MODEL
  DefaultFilter: STATUS = 'ACTIVE'

See also ​

  • Panel — common panel properties
  • List — the host: composing the panels, filters, standard actions
  • GridPanel — the grid presenter
  • Form — record editing controller

Released under Apache License, Version 2.0.