+ if (toscaIndexFlag || nestedToscaFlag) {
+ let indexValueMap : ToscaIndexObject = {indexFlag : toscaIndexFlag, nestedFlag : nestedToscaFlag, indexValue: "0", indexProperty: null, subPropertyArray: subPropertyDropdownList};
+ this.indexListValues.push(indexValueMap);
+ }
+ this.formValidation();
+ }
+
+ onSubPropertyValueChange(indexObject : ToscaIndexObject, elementIndex: number): void {
+ let toscaIndexFlag = false;
+ let nestedToscaFlag = false;
+ let subPropertyDropdownList : Array<PropertyDropdownValue> = [];
+ let selectedProperty: PropertyDropdownValue = indexObject.indexProperty;
+ if (selectedProperty.isList) {
+ toscaIndexFlag = true;
+ if (selectedProperty.schemaType != null) {
+ nestedToscaFlag = true;
+ const dataTypeFound: DataTypeModel = this.dataTypeService.getDataTypeByModelAndTypeName(this.componentMetadata.model, selectedProperty.schemaType);
+ this.addPropertiesToDropdown(dataTypeFound.properties, subPropertyDropdownList);
+ }
+ }
+ if (toscaIndexFlag || nestedToscaFlag) {
+ let indexValueMap : ToscaIndexObject = {indexFlag : toscaIndexFlag, nestedFlag : nestedToscaFlag, indexValue: "0", indexProperty: null, subPropertyArray: subPropertyDropdownList};
+ if(!this.indexListValues[elementIndex+1]) {
+ this.indexListValues.push(indexValueMap);
+ } else {
+ this.indexListValues[elementIndex+1] = indexValueMap;
+ }
+ } else {
+ if(this.indexListValues[elementIndex+1]) {
+ this.indexListValues.splice((elementIndex+1),1);
+ }
+ }
+ this.formValidation();