Initial Data
This section describes the initial data–related configuration options that control the default values assigned to specific property types when an Entry class — CreateEntry, UpdateEntry, DeleteEntry, and DisplayEntry — instance is created.
These options allow the consumer to define how properties of certain EDM types should be pre-filled if no explicit values are provided in the initial data. This helps prevent unintended null values in newly created entities and ensures consistency in default data handling.
Two key behaviors are supported:
-
Guid Generation Mode
Automatically generates random GUID values for properties of typeEdm.Guidif no value is provided. -
Initial Boolean Values
Setsfalseas the default value for properties of typeEdm.Booleanif no value is provided. Without this option, such properties would default tonull.
Configurations can be applied in two ways:
- In the constructor of the Entry class.
- Via getter/setter methods through an instance of an Entry class.
Note
All examples in this section use the CreateEntry class for demonstration purposes. The same configuration applies to other Entry classes as long as the specific feature is supported.
Guid Generation Mode (guidGenerationMode)
Controls the way Edm.Guid properties are automatically populated when creating a new entry.
Supported modes:
- All – Generates random GUID values for all Edm.Guid properties.
- Key – Generates random GUID values only for key Edm.Guid properties.
- NonKey – Generates random GUID values only for non-key Edm.Guid properties.
- None – Does not generate any GUID values automatically (properties will remain
nullunless explicitly set).
Note
- Initial data can only be set by the consumer via the
runmethod of the Entry class instance or Component instance. If the consumer sets initial data forEdm.Guidproperties explicitly, the library will not generate any random guid values for those properties. - This feature is fully supported by CreateEntry but only partially supported by UpdateEntry. In
UpdateEntry, GUID generation applies only when the consumer adds a navigation property with 1:N cardinality. In this case, the application will generate a table for that navigation property, including a create button for adding child entities to an existing parent entity in update mode. - DeleteEntry and DisplayEntry do not support this feature.
Entry Class Availability
| Entry Class | Available |
|---|---|
| CreateEntry | ✅ Yes |
| UpdateEntry | ⚠️ Partial |
| DeleteEntry | ❌ No |
| DisplayEntry | ❌ No |
Implementation Mode Availability
| Mode | Available |
|---|---|
| Dialog Mode | ✅ Yes |
| Component Mode | ✅ Yes |
| Method | Returns | Description |
|---|---|---|
getGuidGenerationMode() |
GuidMode |
Returns the current GUID generation mode for Edm.Guid properties. |
| Method | Parameter | Type | Mandatory | Description |
|---|---|---|---|---|
setGuidGenerationMode(newValue) |
newValue |
GuidMode |
✅ Yes | Sets the GUID generation mode for Edm.Guid properties. |
GuidMode Values
| Value | Description |
|---|---|
All |
Generate random GUID values for all Edm.Guid properties, regardless of whether they are key or non-key fields. |
Key |
Generate random GUID values only for key Edm.Guid properties. |
NonKey |
Generate random GUID values only for Edm.Guid properties that are not keys. |
None |
Do not generate any GUID values automatically. |
Example
| Main.controller.ts | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
| Main.controller.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |
Initial Boolean Values (booleanFalseByDefault)
Specifies whether properties of type Edm.Boolean should default to false when no value is provided in the initial data.
When enabled (true), all Edm.Boolean properties without explicitly set values will be initialized with false instead of null. This ensures more predictable behavior in forms and avoids unintended null states.
Note
- Initial data can only be set by the consumer via the
runmethod of the Entry class instance or Component instance. If the consumer sets initial data forEdm.Booleanproperties explicitly, the library will not set the valuefalsefor those properties. - This feature is fully supported by CreateEntry but only partially supported by UpdateEntry. In
UpdateEntry, initial boolean values apply only when the consumer adds a navigation property with 1:N cardinality. In this case, the application will generate a table for that navigation property, including a create button for adding child entities to an existing parent entity in update mode. - DeleteEntry and DisplayEntry do not support this feature.
Entry Class Availability
| Entry Class | Available |
|---|---|
| CreateEntry | ✅ Yes |
| UpdateEntry | ⚠️ Partial |
| DeleteEntry | ❌ No |
| DisplayEntry | ❌ No |
Implementation Mode Availability
| Mode | Available |
|---|---|
| Dialog Mode | ✅ Yes |
| Component Mode | ✅ Yes |
| Method | Returns | Description |
|---|---|---|
getBooleanFalseByDefault() |
boolean |
Returns whether Edm.Boolean properties default to false in initial data. |
| Method | Parameter | Type | Mandatory | Description |
|---|---|---|---|---|
setBooleanFalseByDefault(newValue) |
newValue |
boolean |
✅ Yes | Sets whether Edm.Boolean properties default to false in initial data. |
Example
| Main.controller.ts | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | |
| Main.controller.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | |