Skip to content

The config file

It is called Config.yaml by default, and it is the one mandatory file in a Kittox application. Think of it as the main entry point. Normally the config file mentions a HomeView from which the entire application is served. The config file contains settings regarding database connections, language and localization, user authentication, access control and so on.

List of first-level config nodes (click on node names for details):

NameTypeDescription
AppTitleStringApplication title
DatabasesSubnodeDatabase connections
AuthSubnodeUser authentication settings
AccessControlSubnodeAccess control (user privileges) settings
HomeyTinyView
HomeSmallView
HomeView
String/SubnodeSpecifies the view to display at application startup (or after login if user authentication is enabled) for client devices up to 5", from 6" to 10" and over 10" respectively
ThemeModeStringTheme mode: light, dark or auto
LogSubnodeLogging-related settings
LanguageIdStringDefault user interface language (such as en)
CharsetStringDefault charset (normally utf-8)
FOPEnginePathStringDefault FOP Engine Path
JavaScriptLibrariesListOptional libreries to include
DefaultsSubnodeDefault settings for layout, grid, form panel, window
UserFormatsSubnodeUser-facing formats: date, time, currency, decimal/thousand separators
DesktopSubnodeWindow properties for Desktop Embedded Mode (ClientWidth, ClientHeight, Maximized, Resizable, BorderIcons, Position)
EmailSubnodeDefault email settings

A Config.yaml example from HelloKitto:

yaml
AppTitle: My First Kitto Application

Databases:
  Main: ADO
    Connection:
      ConnectionString: >
        Provider=SQLOLEDB.1;User ID=sa;Password=xxx;
        Initial Catalog=MyDatabase;Data Source=%COMPUTERNAME%

  Other: DBX
    Connection:
      DriverName: DevartSQLServer
      HostName: %COMPUTERNAME%
      DataBase: MyDatabase
      User_Name: sa
      Password: xxx
      GetDriverFunc: getSQLDriverSQLServer
      LibraryName: dbexpsda40.dll
      VendorLib: sqloledb.dll
  
Auth: DB
  IsClearPassword: True
  IsPassepartoutEnabled: True
  PassepartoutPassword: hfjry%%tebd!qywha$£nò
  Defaults:
    UserName: administrator
    Password: hfjry%%tebd!qywha$£nò

AccessControl: Null
    
# Home is also the default.
HomeView: Home

ThemeMode: auto

# Default: en
LanguageId: it
Charset: utf-8

Log:
  # 1 = Minimal, 5 = Debug.
  Level: 5
  TextFile:
    # Set this to false to disable this logger without deleting its configuration.
    IsEnabled: True
    FileName: %APP_PATH%log.txt
  IsEnabled: False

FOPEnginePath: %FOP1_1%

JavaScriptLibraries: jquery-2.1.3.min jSignature.min

UserFormats:
  Date: dd/mm/yyyy
  Time: hh:nn
  Currency: "€"
  Decimal: ","
  Thousand: "."

Email:
  SMTP:
    Default:
      HostName: smtp.gmail.com
      UserName: username@gmail.com
      Password: userpassword
      Port: 465
      UseTLS: True

UserFormats

The UserFormats node controls how dates, times, and numeric values are displayed throughout the application (both in grids and forms).

PropertyTypeDefaultDescription
DateStringSystem defaultDate display format (e.g. dd/mm/yyyy, mm/dd/yyyy)
TimeStringSystem defaultTime display format (e.g. hh:nn, hh:nn:ss)
CurrencyStringSystem defaultCurrency symbol displayed in currency fields (e.g. , $, £)
DecimalStringSystem defaultDecimal separator character (e.g. , for Italian, . for US/UK)
ThousandStringSystem defaultThousands separator character (e.g. . for Italian, , for US/UK)

These settings override the system's default FormatSettings at application startup. This ensures consistent formatting across the entire application, regardless of the server's locale.

Currency fields in grids display the currency symbol before the formatted value (e.g. € 1.200,50). In forms, the currency symbol appears inside the input field and is temporarily removed while editing.

Example for Italian locale:

yaml
UserFormats:
  Date: dd/mm/yyyy
  Time: hh:nn
  Currency: "€"
  Decimal: ","
  Thousand: "."

Example for US/UK locale:

yaml
UserFormats:
  Date: mm/dd/yyyy
  Time: hh:nn
  Currency: $
  Decimal: "."
  Thousand: ","

Defaults

The Defaults node contains application-wide default settings for the user interface.

yaml
Defaults:
  Layout:
    Char_Width_Factor: 0.85
    Char_Height_Factor: 0.8
    MemoWidth: 60
    MaxFieldWidth: 60
    MinFieldWidth: 5
    RequiredLabelTemplate: "<b>{label}*</b>"
    LabelSeparator: ":"
  FormPanel:
    LabelWidth: 120
  Grid:
    PageRecordCount: 20
    DefaultAction: Edit
  Window:
    Width: 800
    Height: 600

Layout

Controls the sizing and labeling of form fields.

PropertyDefaultDescription
Char_Width_Factor1.0Scale factor for field widths (in CSS ch units). Values < 1.0 produce narrower, more compact fields. See Form — Scale factors.
Char_Height_Factor1.0Scale factor for HTMLMemo editor heights. Values < 1.0 produce shorter editors. See Form — Scale factors.
MemoWidth60Default width in characters for Memo/HTMLMemo fields.
MaxFieldWidth60Maximum field width in characters.
MinFieldWidth5Minimum field width in characters.
RequiredLabelTemplate<b>{label}*</b>HTML template for required field labels. The {label} placeholder is replaced with the field name. Use {label} alone to remove bold and asterisk.
LabelSeparator:String appended after field labels. Set to empty to remove the separator.

FormPanel

PropertyDefaultDescription
LabelWidth120Width in pixels for side-aligned labels (Left or Right alignment).

Grid

PropertyDefaultDescription
PageRecordCount20Number of records per page in grid views.
DefaultActionEditDefault double-click action on grid rows (Edit or View).

Window

PropertyDefaultDescription
Width800Default window width in pixels.
Height600Default window height in pixels.

Released under Apache License, Version 2.0.