Skip to content

DataPanelLeaf

DataPanelLeaf (TKXDataPanelLeafController) is the abstract base class for controllers that display record data linked to a ViewTable (see DataView). You never use this class directly — you use one of its concrete subclasses instead.

Class hierarchy

Panel (TKXPanelControllerBase)
  └── DataPanelLeaf (TKXDataPanelLeafController)
        ├── GridPanel
        ├── ChartPanel
        ├── GroupingList
        └── TemplateDataPanel

As a Panel, DataPanelLeaf inherits all common panel properties (Title, IsModal, Maximized, AllowClose, Width, Height, Collapsible, etc.).

Inherited controllers

ControllerDescription
GridPanelTabular data grid with sorting, column layouts, row colors
ChartPanelChart.js charts (bar, line, pie, doughnut)
GroupingListGrid with collapsible group headers
TemplateDataPanelCustom HTML templates for read-only display

Common features

All DataPanelLeaf controllers share these capabilities:

ToolViews

Custom action buttons on the controller's toolbar. Each ToolView launches a Tool controller:

yaml
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 standard CRUD operations through the MainTable/Controller node:

PropertyTypeDefaultDescription
PreventAddingBooleanFalseHide the Add button
PreventEditingBooleanFalseHide the Edit button
PreventDeletingBooleanFalseHide the Delete button
PreventRefreshingBooleanFalseHide the Refresh button
AllowViewingBooleanFalseShow the View (read-only) button
AllowDuplicatingBooleanFalseShow the Duplicate button
IsMultiSelectBooleanFalseAllow selecting multiple records
PagingToolsBooleanFalseEnable server-side pagination

The toolbar buttons appear in this order: Add, Duplicate, Edit, Delete, View, Refresh, then any custom ToolViews.

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
  • GridPanel — tabular grid controller
  • List — list controller with filters and regions
  • Form — record editing controller

Released under Apache License, Version 2.0.