Kitto.Metadata.ViewBuilders
View builders that auto-generate a data view from a model at runtime, one per presentation: a list view (TKAutoListViewBuilder), a form view (TKAutoFormViewBuilder), a grouped list (TKAutoGroupingListViewBuilder), a template-rendered panel (TKAutoTemplateDataViewBuilder), a chart (TKAutoChartViewBuilder), a calendar (TKAutoCalendarViewBuilder) and a map (TKAutoGoogleMapViewBuilder), registered as 'AutoList', 'AutoForm', 'AutoGroupingList', 'AutoTemplateData', 'AutoChart', 'AutoCalendar' and 'AutoGoogleMap'. Used when a view is referenced through a 'Build ...' expression instead of a YAML file.
Where the controller ends up differs on purpose: a presenter that needs the data context and the filter panel of a host (the chart, the calendar) is built as the Center of a List, which is the shape every hand-written view of that kind has; one that makes its own context (the grid, the form, the template panel, the map) sits at the root of the view.
TKAutoViewBuilderBase class
Base class for the auto view builders. Builds a data view for a model, adding all fields, detail tables and a free-search filter; descendants supply the controller type and any view customization.
function BuildView(const AViews: TKViews;Builds and returns the data view for the configured model.
TKAutoListViewBuilder class
Auto view builder that produces a List (grid) view. Registered as 'AutoList'.
TKAutoFormViewBuilder class
Auto view builder that produces a Form view (in Add mode). Registered as 'AutoForm'.
TKAutoGroupingListViewBuilder class
Auto view builder that produces a GroupingList view: a grid whose rows are collected under a header for each distinct value of one field. Registered as 'AutoGroupingList'. Beside Model, the builder node takes GroupingFieldName (required: the field the rows are grouped by) and, optionally, SortFieldNames, StartCollapsed, ShowName and ShowCount, which are passed through to the controller's Grouping node only when present, so that anything left out keeps the controller's own default.
TKAutoTemplateDataViewBuilder class
Auto view builder that produces a TemplateDataPanel view: the records are rendered through an HTML template instead of a grid. Registered as 'AutoTemplateData'. The builder node needs either TemplateFileName (a template file looked up among the application resources) or Template (inline markup); without one of the two the controller would render an error placeholder instead of the data.
TKAutoChartViewBuilder class
Auto view builder that produces a chart view: a List hosting a ChartPanel as its Center presenter. Registered as 'AutoChart'. Beside Model, the builder node takes LabelFieldName and ValueFieldName (both required: the field whose values label the bars or the slices, and the numeric field they are sized by) and, optionally, ChartType (Cartesian, the default, or Polar), SeriesType (Bar/Line for Cartesian, Pie/Pie3D for Polar), SeriesDisplayName, Title, ValueAxisTitle, Donut, LegendPosition, and GridPosition/GridWidth to put a grid beside the chart.
TKAutoCalendarViewBuilder class
Auto view builder that produces a calendar view: a List hosting a CalendarPanel as its Center presenter. Registered as 'AutoCalendar'. Beside Model, the builder node takes StartDateFieldName (required) and, optionally, EndDateFieldName (defaulting to the start field, for records that are a point in time), IdFieldName, TitleFieldName, EventTypeFieldName, EventNotesFieldName - which become the calendar mapping under the view table's Model node - plus DefaultView, SlotMinTime, SlotMaxTime, DefaultEventMinutes and EventTemplate, which are passed through to the panel.
TKAutoGoogleMapViewBuilder class
Auto view builder that produces a map view: Controller GoogleMap, whose markers are geocoded from the address fields of each record. Registered as 'AutoGoogleMap'. Beside Model, the builder node takes AddressFields (required, a comma-separated list) and, optionally, TitleField, InfoFields, Zoom, CenterLatitude, CenterLongitude, MapTypeId, SidebarPosition and SidebarWidth.
