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:

  1. 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

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -