Hey,
First of all, welcome. :)
As in this example, there are more than one item with this type set. This means 
it can not work in general. But even if it could work, qooxdoo does not offer 
such a feature. You can only set the whole model or, if you have configured a 
deputy, you can use this for the selection. Imagine you have that type as 
deputy, that would work if unique.
Regards, 
Martin

Am 01.10.2010 um 18:10 schrieb "chrisch" <[email protected]>:

> 
> I'm new to qooxdoo and JavaScript and just playing a bit around with it. Now
> I have a question (maybe the answer is easy) regarding this playground
> example: http://tinyurl.com/3427boe
> 
> There is a SelectBox and a JSON-file with this structure: 
> 
> "items": [
>    {"name": "a", "type": "media-video"},
>    {"name": "b", "type": "office-calendar" }
>    and so on...
> ]}
> 
> The JSON-data is bound via controller and so on to the SelectBox, the
> entry-labels are a, b...
> 
> My question: How can I select for example the entry "b" in the SelectBox via
> the "type"-property "office-calendar"? Is there something like:
> controller.setSelection("type", "office-calendar")?
> 
> In the playground example the selection is done with:
> 
> controller.getSelection().setItem(0,
> store.getModel().getItems().getItem(5)); 
> 
> I've learned that I had to put the whole object into the getSelection of the
> controller, but what can I do if I don't know the correct index of the
> object and only know the "type"-property? Must I run trough the whole object
> to find the right index for "office-calendar" or is there a simple solution? 
> 
> Thanks
> Christian
> -- 
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/selection-of-a-SelectBox-tp5591921p5591921.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
> 
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to