#967 dynamic container resolution

This commit is contained in:
Denys Vuika
2016-11-15 10:46:49 +00:00
committed by Mario Romano
parent 3092cfddaa
commit 084d962230
9 changed files with 38 additions and 68 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { Component, Input, ElementRef } from '@angular/core';
import { Component, ElementRef, OnInit } from '@angular/core';
import { WidgetComponent } from './../widget.component';
import { DynamicTableModel, DynamicTableRow, DynamicTableColumn } from './../core/index';
@@ -25,11 +25,10 @@ import { DynamicTableModel, DynamicTableRow, DynamicTableColumn } from './../cor
templateUrl: './dynamic-table.widget.html',
styleUrls: ['./dynamic-table.widget.css']
})
export class DynamicTableWidget extends WidgetComponent {
export class DynamicTableWidget extends WidgetComponent implements OnInit {
ERROR_MODEL_NOT_FOUND = 'Table model not found';
@Input()
content: DynamicTableModel;
editMode: boolean = false;
@@ -39,6 +38,12 @@ export class DynamicTableWidget extends WidgetComponent {
super();
}
ngOnInit() {
if (this.field) {
this.content = new DynamicTableModel(this.field.form, this.field.json);
}
}
isValid() {
let result = true;