Framework provides the following functionality:
Lazy table (browse)
- supports the associated attributes from entity associated through the ManyToOne association (example of the path to the associated attribut: assoc1.assoc2.attribX)
- in the column filter for the associated attribute (attribute with path > 1) can be used combobox
- supports the buttons for opening the form (for the create and modification of the row) and the button for the removing of the row
- special component XBrowse enables the creation of the lazy table that can be modified direct in the application (runtime edit), the appearance of the table is saved into the database (the appearance of the table is not the part of the application source code)
Note: Lazy table is used for the viewing of the rows of the table containing big amount of data. Filtering and sorting is executed over the database table, framework (more exactly the mapper TypeORM) generates the SQL requests (WHERE condition for filtering, ORDER BY clause for sorting).
Lazy table – source code example: CarBrowse.tsx
Form for the row editing
- has components for the editing of all basic attribute types
- has component XDropdown for setting of the associated row through the dropdown (combobox)
- has component XSearchButton for setting of the associated row through the searching dialog
- supports master-detail – component XFormDataTable2 enables editing of the detail rows
The form components support the basic validation (for example in the date field can be only valid date written). Framework automatically saves the attribute changes into the database (no need to code the saving). SQL commands for the saving are generated by the mapper TypeORM.
Form – source code example: CarForm.tsx
Supported attribute types
- number – numbers without fractional part (for example row id)
- decimal – numbers with fractional part (used for financial sums)
- datetime – date with the time part
- ManyToOne association
- OneToMany association
Attributes and their types are written in the entity. Entity is used for the mapping of the object to the database table. The list of the entities and attributes is called metadata. The metadata is strong used all over the framework, on the client and also on the server. Thanks metadata, many tasks can be done automatically, for example formatting values, input value validation, setting the default width of the column of the table and many others. The programmer has less work and the application code is easier for the maintenance.
Entity – source code example: car.entity.ts