Hello Stefan,

To be honest, I don't really get what you are trying to do. But  I can see that 
you are binding the selection of a widget which never has worked. The plain 
selection of a widget is a native JavaScript array which can't be bound. If you 
want to have the first selected model of the SelectBox bound, use the model 
selection which contains the selected models and is a data array ready for 
binding:

controller.addTarget(this.__subjectSB, "modelSelection[0]", "subject", true);

Regards,
Martin

Am 29.08.2010 um 20:52 schrieb Stefan Andersson:

When using a select box and setting the model afterwards creates an error:

      var controller = new qx.data.controller.Object();

      // create the data model
            var skeleton = {
                subject : null
            };

      controller.addTarget(this.__subjectSB, "selection", "subject", true);

      this.__model = qx.data.marshal.Json.createModel(skeleton, true);

      controller.setModel(this.__model);

generates this error:

items is null
[chrome://firebug/content/blank.gif] switch(items.length)

if I make this change:

      controller.addTarget(this.__subjectSB, "selection[0]", "subject", true);

I get this error:

targetArray.setItem is not a function
[chrome://firebug/content/blank.gif] targetArray.setItem(index, value);

It seems to me to be a bug! Is it?

The error ONLY occurs with the select box. I have not tested for checkbox, 
radiobutton, but for text field, area, date field which are ok.

Stefan
<ATT00001..txt><ATT00002..txt>

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to