[ADF-957] removed double call to load form (#2046)

This commit is contained in:
Vito
2017-07-05 09:29:22 -07:00
committed by Eugenio Romano
parent b32a023581
commit 846f3a8069
3 changed files with 6 additions and 18 deletions

View File

@@ -169,12 +169,6 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
this.formService.formContentClicked.subscribe((content: ContentLinkModel) => {
this.formContentClicked.emit(content);
});
if (this.nodeId) {
this.loadFormForEcmNode();
} else {
this.loadForm();
}
}
ngAfterViewChecked() {
@@ -202,7 +196,7 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
let nodeId = changes['nodeId'];
if (nodeId && nodeId.currentValue) {
this.loadFormForEcmNode();
this.loadFormForEcmNode(nodeId.currentValue);
return;
}
@@ -439,8 +433,8 @@ export class ActivitiForm implements OnInit, AfterViewChecked, OnChanges {
this.onFormDataRefreshed(this.form);
}
private loadFormForEcmNode(): void {
this.nodeService.getNodeMetadata(this.nodeId).subscribe(data => {
private loadFormForEcmNode(nodeId: string): void {
this.nodeService.getNodeMetadata(nodeId).subscribe(data => {
this.data = data.metadata;
this.loadFormFromActiviti(data.nodeType);
},