I am trying to initialize / update a selectbox in Qooxdoo Mobile from json.
this.__model = new qx.data.Array();
var selQuestion = "substance released";
sel = new qx.ui.mobile.form.SelectBox();
sel.setDialogTitle(selQuestion);
sel.setModel(this.__model);
form.add(sel, selQuestion)
I have tried updating it using this method, but according to the manual the mobile lists are not supported yet.
test = ["item1", "item2"];
new qx.data.controller.List(new qx.data.Array(test), sel);
Also using the apply method on the property change I couldn't get it to work (the box stays empty):
__applySubstances : function(value, old) {
this._model = new qx.data.Array();
if(value) {
for(i in value.toArray()) {
this._model.push(value.toArray()[i].getName());
}
}
}
Can anyone push me in the right direction?