I'm moving from qx.ui.form.List to qx.ui.list.List. In form.List you can use
ListItem to render the item.
In list.List you are tied to qx.data.Array but all available examples works
with simple strings as the items for the list.
What happen if I want to render the item with an icon like with ListItem?
How can I do that?
Here is the example available in the Demo (a valid example):
// Creates the model data
var rawData = [];
for (var i = 0; i < 8; i++) {
rawData.push(i);
}
var data = new qx.data.Array(rawData);
// Creates the list.
var list = new qx.ui.list.List(data);
But what happen if the data is little bit more complex? See this example:
for (var i = 0; i < 8; i++) {
rawData.push({
id : i,
name : "something " + i,
value : Math.random()
});
}
var data = new qx.data.Array(rawData);
or this:
for (var i = 0; i < 8; i++) {
rawData.push(new myClass(i);
}
var data = new qx.data.Array(rawData);
With this last case I got the following error message:
"Invalid incoming value for property 'label' of class 'qx.ui.basic.Atom':
Expected value to be a string but found myClass[...]"
I think that myClass should follow an Interface or Mixin in order to be
rendered by the list, but I can't find any information.
Thanks for your help!
Regards,
Herman
--
View this message in context:
http://qooxdoo.678.n2.nabble.com/ListItem-and-qx-ui-list-List-virtual-list-tp6242067p6242067.html
Sent from the qooxdoo mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel