SelectBox and getModelSelection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view

SelectBox and getModelSelection

Daniel Lenggenhager
Hi all,

I've an error, when I try to reload a select box and remember the selected model (to reselect after reloading).
Error: Could only select one item, but the selection array contains 2 items!

Have I missed something? - Thanks for the help.



Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
qooxdoo-devel mailing list
[hidden email]
Reply | Threaded
Open this post in threaded view

Re: SelectBox and getModelSelection

  var modelSelection = (selectBox.isSelectionEmpty()) ? 2 : selectBox.getModelSelection().getItem(0);
  [{ID: 1, name: 'Test ' + Math.random()},{ID: 2, name: 'Test ' + Math.random()},{ID: 3, name: 'Test ' + Math.random()}].forEach(function(item){
    selectBox.add(new qx.ui.form.ListItem(, null, item.ID));