Deutsch
|
English

Domain Model Editor: Conditional configurations

Support Center

IC12584

Conditional Configurations: Type-Dependent Properties

Many properties in the XML columns are only relevant if another property has a specific value. These conditional dependencies must be taken into account during implementation.

GL_BEREICH_T: TYPE-dependent SectionConfig properties

The SectionConfig XML has TYPE :

TYPE = 'WebForm' ✅ MAINTAIN

<SectionConfig>
  <Type>WebForm</Type>
  <!-- Keine zusätzlichen Domain-Model-Properties -->
  <!-- Alle weiteren Properties sind UI-relevant (Collapsed, Visible, CssClass) -->
</SectionConfig>

TYPE = 'System' ✅ MAINTAIN

<SectionConfig>
  <Type>System</Type>
  <!-- System-Sections werden automatisch generiert, keine Konfiguration nötig -->
</SectionConfig>

TYPE = 'ListConnect' ✅ MAINTAIN (1:N relationships)

<SectionConfig>
  <Type>ListConnect</Type>
  <ForeignKeyTableName>RE_RAUM_T</ForeignKeyTableName>
  <ForeignKeyColumnName>RAUM_ID</ForeignKeyColumnName>
  <IsLinkConnect>false</IsLinkConnect>
  <IsOne2One>false</IsOne2One>
</SectionConfig>

Meaning:

  • ForeignKeyTableName: Target table of the navigation property (e.g., RE_RAUM_T)

  • ForeignKeyColumnName: Foreign key column in the current table (e.g. RAUM_ID)

  • IsLinkConnect: true = Link only, false = Embedded list

  • IsOne2One: true = 1:1 relationship, opens the linked record directly

TYPE = 'CheckboxConnect' ⚠️ CHECK (N:M relationships)

<SectionConfig>
  <Type>CheckboxConnect</Type>
  <MappingTable>GL_GRUPPE_USER_T</MappingTable>
  <DestinationTable>GL_GRUPPE_T</DestinationTable>
  <DisplayColumns>BEZEICHNUNG</DisplayColumns>
  <DisplayFilter>[{"field":"AKTIV","value":"1"}]</DisplayFilter>
</SectionConfig>

GL_TABELLE20_T: TYPE-dependent PageConfig properties

TYPE = 'Table' ✅ MAINTAIN

<PageConfig>
  <Type>Table</Type>
  <SystemName>Room</SystemName>
  <Description>Raum-Entity</Description>
</PageConfig>

<TableConfig>
  <PrimaryKeys>RAUM_ID</PrimaryKeys>
  <AllowInsert>true</AllowInsert>
  <AllowUpdate>true</AllowUpdate>
  <AllowDelete>true</AllowDelete>
</TableConfig>

TYPE = 'View' ✅ MAINTAIN

<PageConfig>
  <Type>View</Type>
  <SystemName>RoomView</SystemName>
  <Description>Raum-Ansicht (read-only)</Description>
</PageConfig>

<TableConfig>
  <PrimaryKeys>PKID</PrimaryKeys>
  <ReadOnly>true</ReadOnly>
</TableConfig>

GL_TABELLENSPALTE20_T: Data type-dependent ColumnConfig properties

Data Type = String (varchar, nvarchar, char)

<ColumnConfig>
  <Required>true</Required>
  <MinLength>2</MinLength>
  <MaxLength>100</MaxLength>
  <RegularExpression>^[A-Z0-9]+$</RegularExpression>
  <IsEmail>false</IsEmail>
  <IsUrl>false</IsUrl>
</ColumnConfig>

Data Type = Numeric (int, bigint, decimal, money, float)

<ColumnConfig>
  <Required>true</Required>
  <MinValue>0</MinValue>
  <MaxValue>999999</MaxValue>
  <UseAutoCounter>false</UseAutoCounter>
</ColumnConfig>

Implementation Strategy

1. DTO design with type-specific properties

public class SectionMetadataDto
{
    public Guid SectionUid { get; set; }
    public string Type { get; set; }
    
    public ListConnectMetadataDto? ListConnect { get; set; }
    public CheckboxConnectMetadataDto? CheckboxConnect { get; set; }
}

2. Conditional validation

When(x => x.Type == "ListConnect", () =>
{
    RuleFor(x => x.ListConnect)
        .NotNull()
        .WithMessage("ListConnect-Metadaten sind erforderlich");
});

Summary: Conditional Properties Matrix

Type

Status

Conditional Properties

WebForm

✅ MAINTAIN

No additional

System

✅ MAINTAIN

No additional

ListConnect

✅ MAINTAIN

ForeignKeyTableName, ForeignKeyColumnName, IsLinkConnect, IsOne2One

CheckboxConnect

⚠️ CHECK

MappingTable, DestinationTable, DisplayColumns, DisplayFilter

CrystalReport

❌ NO

UI-only Properties

StaticSection

❌ NO

Plugin Name

For more details on implementation, see the full documentation in the Domain Model Editor repository.

War dieser Artikel hilfreich?