Fixed... a silly, stupid oversight
This snippet of code from the playground
form.add(sb, "SelectBox", null, "type", null);
controller.addBindingOptions(sb,
{converter:function (data, model, source, target) {
// model --> target
Looked like this in
ot;, "largestring"]
So, in the end, I want to end up with the following:
- on loading the form, the selectbox shows the current value of the model
- on updating the selectbox, using it's list of options, the type field in
the model is updated
- the list of values used by the sel
Surprising
I typed up this in the playground and it seems to work.
// Get the data (from a JSON server call)
var JsonModel = {"author": "system",
"fields": [{"default": null, "lowerbound": null, "type":
"string", "name": "filterfield", "upperbound": null},
I guess you're right, I shouldn't try to rush the question through and hope
someone can solve it from little scraps. I'll put it in the playground
tonight.
Angelo
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Data-binding-question-tp7582102p7582143.htm
{
'name':'thirdvalue',
'type':'fourthvalue'
}
}
}
Angelo
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/Data-b
idx+'].type',
this);
this.__controller.setModel(this.__model); // form and
controller were created and linked earlier
Either I'm completely on the wrong track, or I'm missing a small detail. Who
can tell me what to change?
Thanks already,
Angelo
--
View this