@@ -228,8 +228,6 @@ public void DisplayOrEditEntityReferable(
228
228
setNullList : ( ) => referable . DisplayName = null ) ;
229
229
}
230
230
231
-
232
-
233
231
// category deprecated
234
232
this . AddHintBubble (
235
233
stack , hintMode ,
@@ -1453,34 +1451,50 @@ public void DisplayOrEditEntityDataSpecificationIec61360(
1453
1451
AddHintBubble (
1454
1452
stack , hintMode ,
1455
1453
new [ ] {
1456
- new HintCheck (
1457
- ( ) => { return dsiec . PreferredName == null || dsiec . PreferredName . Count < 1 ; } ,
1458
- "Please add a preferred name, which could be used on user interfaces " +
1459
- "to identify the concept to a human person." ,
1460
- breakIfTrue : true ) ,
1461
- new HintCheck (
1462
- ( ) => { return dsiec . PreferredName . Count < 2 ; } ,
1463
- "Please add multiple languanges." ,
1464
- severityLevel : HintCheck . Severity . Notice )
1454
+ new HintCheck (
1455
+ ( ) => dsiec . PreferredName != null && dsiec . PreferredName . IsValid ( ) != true ,
1456
+ "According to the specification, an existing list of elements shall contain " +
1457
+ "at least one element and for each element all mandatory fields shall be " +
1458
+ "not empty." ) ,
1459
+ new HintCheck (
1460
+ ( ) => { return dsiec . PreferredName == null || dsiec . PreferredName . Count < 1 ; } ,
1461
+ "Please add a preferred name, which could be used on user interfaces " +
1462
+ "to identify the concept to a human person." ,
1463
+ breakIfTrue : true ) ,
1464
+ new HintCheck (
1465
+ ( ) => { return dsiec . PreferredName . Count < 2 ; } ,
1466
+ "Please add multiple languanges." ,
1467
+ severityLevel : HintCheck . Severity . Notice )
1465
1468
} ) ;
1466
1469
if ( SafeguardAccess (
1467
1470
stack , repo , dsiec . PreferredName , "preferredName:" , "Create data element!" ,
1468
1471
v =>
1469
1472
{
1470
- dsiec . PreferredName = new List < Aas . ILangStringPreferredNameTypeIec61360 > ( ) ;
1473
+ dsiec . PreferredName = ExtendILangStringPreferredNameTypeIec61360 . CreateFrom (
1474
+ lang : AdminShellUtil . GetDefaultLngIso639 ( ) , text : "" ) ;
1475
+
1471
1476
this . AddDiaryEntry ( relatedReferable , new DiaryEntryStructChange ( ) ) ;
1472
1477
return new AnyUiLambdaActionRedrawEntity ( ) ;
1473
1478
} ) )
1474
1479
AddKeyListLangStr < ILangStringPreferredNameTypeIec61360 > (
1475
1480
stack , "preferredName" , dsiec . PreferredName ,
1476
1481
repo , relatedReferable : relatedReferable ,
1477
- setNullList : ( ) => dsiec . PreferredName = null ) ;
1482
+ setNullList : ( ) =>
1483
+ {
1484
+ dsiec . PreferredName = ExtendILangStringPreferredNameTypeIec61360 . CreateFrom (
1485
+ lang : AdminShellUtil . GetDefaultLngIso639 ( ) , text : "" ) ;
1486
+ } ) ;
1478
1487
1479
1488
// ShortName
1480
1489
1481
1490
AddHintBubble (
1482
1491
stack , hintMode ,
1483
1492
new [ ] {
1493
+ new HintCheck (
1494
+ ( ) => dsiec . ShortName != null && dsiec . ShortName . IsValid ( ) != true ,
1495
+ "According to the specification, an existing list of elements shall contain " +
1496
+ "at least one element and for each element all mandatory fields shall be " +
1497
+ "not empty." ) ,
1484
1498
new HintCheck (
1485
1499
( ) => { return dsiec . ShortName == null || dsiec . ShortName . Count < 1 ; } ,
1486
1500
"Please check if you can add a short name, which is a reduced, even symbolic version of " +
@@ -1502,7 +1516,8 @@ public void DisplayOrEditEntityDataSpecificationIec61360(
1502
1516
stack , repo , dsiec . ShortName , "shortName:" , "Create data element!" ,
1503
1517
v =>
1504
1518
{
1505
- dsiec . ShortName = new List < Aas . ILangStringShortNameTypeIec61360 > ( ) ;
1519
+ dsiec . ShortName = ExtendILangStringShortNameTypeIec61360 . CreateFrom (
1520
+ lang : AdminShellUtil . GetDefaultLngIso639 ( ) , text : "" ) ;
1506
1521
this . AddDiaryEntry ( relatedReferable , new DiaryEntryStructChange ( ) ) ;
1507
1522
return new AnyUiLambdaActionRedrawEntity ( ) ;
1508
1523
} ) )
0 commit comments