Trubles with select widget

1
0
-1

Hello everybody,

I'm trying to use the select widget but without success so far. I initialized it as followed:
Available values: [{"v":0,"l":"A"},{"v":1,"l":"B"},{"v":2,"l":"C"}]
Displayed key: l
Returned key: v

The options are there, but if I try to select one, I get something like infinite loop with errors:

vendor.min.js:6 Uncaught Error: [$rootScope:infdig] http://errors.angularjs.org/1.3.18/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22m…0b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A63527%2C%22oldVal%22%3A63524%7D%5D%5D(anonymous function) @ vendor.min.js:6m.$digest @ vendor.min.js:124m.$apply @ vendor.min.js:127(anonymous function) @ vendor.min.js:139e @ vendor.min.js:40(anonymous function) @ vendor.min.js:44
vendor.min.js:102 Error: [$rootScope:infdig] http://errors.angularjs.org/1.3.18/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22m…0b(e%2Cc%2Cd)%7D%22%2C%22newVal%22%3A63560%2C%22oldVal%22%3A63557%7D%5D%5D
    at Error (native)
    at http://localhost:8080/designer/runtime/js/vendor.min.js:6:417
    at m.$digest (http://localhost:8080/designer/runtime/js/vendor.min.js:124:445)
    at m.$apply (http://localhost:8080/designer/runtime/js/vendor.min.js:127:12)
    at http://localhost:8080/designer/runtime/js/vendor.min.js:139:243
    at e (http://localhost:8080/designer/runtime/js/vendor.min.js:40:74)
    at http://localhost:8080/designer/runtime/js/vendor.min.js:44:162(anonymous function) @ vendor.min.js:102(anonymous function) @ vendor.min.js:76m.$apply @ vendor.min.js:127(anonymous function) @ vendor.min.js:139e @ vendor.min.js:40(anonymous function) @ vendor.min.js:44

Do someone knows how to deal with or avoid this problem?

1 answer

1
0
-1
This one is the BEST answer!

You should create a variable with desired items and bind this variable to "Available values" attribute.

Comments

Submitted by andrey.alexandr... on Mon, 05/30/2016 - 08:02

I initialized formInput like this: {"step" : 0} and "Value" in the widget configuration was set to formInput.step. Is there something else to be done?

Submitted by mmichalak on Mon, 05/30/2016 - 11:43

I meant you should create a list variable. E.g: variable named "stepDictionary" with JSON value [{"v":0,"l":"A"},{"v":1,"l":"B"},{"v":2,"l":"C"}]. And bind it to Select widget's "Available values" attribute.

Submitted by andrey.alexandr... on Mon, 05/30/2016 - 12:52

Thank you, it works!

Notifications