diff --git a/src/app/formulaire/definition/form-section.ts b/src/app/formulaire/definition/form-section.ts index 8f8be0af96d577110333fe270c861ec7297c621f..bf06c16b257e578889469d86dc696f6ea15249a0 100644 --- a/src/app/formulaire/definition/form-section.ts +++ b/src/app/formulaire/definition/form-section.ts @@ -7,16 +7,14 @@ import { SectionType } from "jalhyd"; export class FormulaireSection extends FormulaireFixedVar { - /** for SectionNubs only */ - protected _defaultSectionType; - /** * determine default section type from select configuration */ private parseDefaultSectionType() { - if (this._defaultSectionType === undefined) { + if (this.defaultProperties["nodeType"] === undefined) // still use "nodeType" for consistency, should be named "sectionType" + { const def = this.parseSelectDefaultValue(this._jsonConfig, "select_section"); - this._defaultSectionType = SectionType[def]; + this.defaultProperties["nodeType"] = SectionType[def]; } } @@ -31,7 +29,7 @@ export class FormulaireSection extends FormulaireFixedVar { // add new Section as first child, from given nodeType const propsSection = new Props(); propsSection.setPropValue("calcType", CalculatorType.Section); - propsSection.setPropValue("nodeType", this._defaultSectionType); + propsSection.setPropValue("nodeType", this.defaultProperties["nodeType"]); propsSection.setPropValue(Prop_NullParameters, ServiceFactory.applicationSetupService.enableEmptyFieldsOnFormInit); const section = Session.getInstance().createNub(propsSection); this.currentNub.setSection(section as acSection);