title: qooxdoo qx.ui.form.VirtualComboBox key value pairs
body: <p>I would like to know if it is there a prefered way to use key,value pairs in a qooxdoo qx.ui.form.VirtualComboBox. I would like the name to be set in the textbox but when requested the id should be returned. All the examples for this widget I have seen use just the value. I am posting the code how I am approaching the problem but I would like to know if there is a better/prefered way using data binding. So far every time I need the value or the key I loop through the model to find a match. Here is the playground example: <a href="http://tinyurl.com/neyfwva" rel="nofollow">http://tinyurl.com/neyfwva</a></p>
  
  <pre><code>//John is set for testing purposes
  var myJSONObject = {"personal": [
          {"name": "Martin", "id": "1", "age": "32"},
          {"name": "Horst", "id": "2", "age": "55"},
          {"name": "Peter", "id": "3", "age": "23"},
          {"name": "John", "id": "2", "age": "40"}  ]
  };
  
  var jsonmodel = qx.data.marshal.Json.createModel(myJSONObject);
  
  var comboBox = new qx.ui.form.VirtualComboBox(jsonmodel.getPersonal());
  comboBox.setLabelPath("name");
  
  comboBox.setDelegate({bindItem : function(controller, item, id) {
    controller.bindProperty("name", "label", null, item, id);
    controller.bindProperty("id", "model", null, item, id);
  }});
  
  
  this.getRoot().add(comboBox);
  
  //#################################################################
  //--&gt;&gt; get "ID" from selected value
  var button1 = new qx.ui.form.Button("get ID from selectbox");
  this.getRoot().add(button1,
  {
    left : 20,
    top  : 50
  });
  button1.addListener("execute", function(e) {
    var model = comboBox.getModel();
    var selection= null;
  
    for(var i = 0, l = model.getLength(); i &lt; l; i++){
      if(model.getItem(i).getName() === comboBox.getValue()){
        selection = model.getItem(i);
        break;
      }
    }
  
    if(selection){
    alert(selection.getId());
    }
  });
  //#################################################################
  
  //#################################################################
  //--&gt;&gt; set value "Horst" by giving id
  var button2 = new qx.ui.form.Button("set ID -2- (also Horst)");
  this.getRoot().add(button2,
  {
    left : 200,
    top  : 50
  });
  button2.addListener("execute", function(e) {
    var model = comboBox.getModel();
    var selection = null;
  
    for(var i =0, l = model.getLength(); i &lt; l; i++){
      if(model.getItem(i).getId() === "2"){
        selection = model.getItem(i);
        break;
      }
    }
  
    if(selection){
    comboBox.setValue(selection.getName());
    }
  });
  </code></pre>