Hi,

1) Bind second field with the VirtualSelectBox (label):
The data structure form your example, defines an array for each model 
item. So you need only to set the "labelPath" with the second field:
vlistBox.setLabelPath("[1]");

2) Bind selection with own label:
You can define a binding path between the VirtualSelectBox and the 
Label. The binding path should contain the selected model item and the 
value in your model (third field):
vlistBox.bind("selection[0].[2]", labelAge, "value");

"selection[0]" describes the selected model item and "[2]" describes the 
path to the third field in your model item. The data binding manual 
describes this as property chain, you can have a look at [1] for more 
details.

Here the Playground example:
http://tinyurl.com/3bm5dws

Cheers,
Chris

[1] 
http://manual.qooxdoo.org/current/pages/data_binding/single_value_binding.html#bind-a-property-chain-to-another-property

Am 18.04.2011 09:31, schrieb slah:
> good morning,
>
> could someone kindly help me in achieving the following:
> My backend is sending data like this:
>
>
> var myJSONObject = {"values": [
>      [1, "james", 21],
>      [2, "sami", 34],
>      [3, "meniar", 35]
>      ]
>      };
>
> I want to display the 2nd field of every array in a virtual list box and to
> show the 3rd field of the selection in a label.
>
> I've created a playground demo here: http://tinyurl.com/3asess3
>
> how could all this be done,
>
> My best regards
>
> --
> View this message in context: 
> http://qooxdoo.678.n2.nabble.com/VirtualListBox-and-array-of-array-tp6282655p6282655.html
> Sent from the qooxdoo mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Benefiting from Server Virtualization: Beyond Initial Workload
> Consolidation -- Increasing the use of server virtualization is a top
> priority.Virtualization can reduce costs, simplify management, and improve
> application availability and disaster protection. Learn more about boosting
> the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to