bpm - Bonita 7 : Custom Widget property type to support JSON data -
i trying create new custom widget in bonita 7 , need property can accept json data (not simple array collection) i.e., want assign below data
[ { 'header1': 'data1-1', 'header2': 'data1-2', 'header3': 'data1-3' }, { 'header1': 'data2-1', 'header2': 'data2-2', 'header3': 'data2-3' } ]
i tried available property types (text,choice ,html ,integer,boolean ,collection property) & guess nothing works. me achieve this.
i trying create smart-table custom widget (https://github.com/lorenzofox3/smart-table) & want table data(rows) populated using variable of json type.
is there other way of achieving this.
thank time
i sorry, collection property type works
this did:
- in custom widget editor
1a) created new property :
name : tabledatacollection label: table_data type: collection (text type works) default value: (trying assign json data here didn't work me)
1b) in controller box, use property tabledatacollection defined in step 1a:
$scope.data = $scope.properties.tabledatacollection; (inside function ($scope) {})
1c) in template box, use variable data defined in step 1b:
example : <tr ng-repeat="row in data">
2) in page editor (form editor), if using custom widget created in step 1, see new fields on right related custom widget. in case table_data
2a) now, create new form variable of type json.
example : data2var =
[{ "header1": "data1-1", "header2": "data1-2", "header3": "data1-3" }, { "header1": "data2-1", "header2": "data2-2", "header3": "data2-3" }]
2b) now, assign variable created in step 2a custom widget field. in case, assigned data2var table_data
Comments
Post a Comment