Hi,

first of all, welcome to qooxdoo and welcome to the list!

Unfortunately, I don't quite follow you. Maybe you can assemble a simple 
example in the playground [1] ? By the way, in case you don't know, there a 
some nice demos for ui.list.List, for example GroupedList [2].

Tristan

[1] http://demo.qooxdoo.org/current/playground/
[2] http://demo.qooxdoo.org/current/demobrowser/demo/virtual/GroupedList.html

Am 30.12.2010 um 13:21 schrieb SkeletJoke:


Hello folks, This is my first post.
I'm really new in programming but I'm studying a lot ^^ I think qooxdoo is
amazing! I'm en loved with the tool! hahahaha
I'm studying how to use data binding to my GUI right now, but i have this
situation,

My JSON:
{ "persons" :
  [
     {"name": "Jonas", "location": "Brasil"}
     {**various objects**}
  ]
}

I need to bind this data to a list, I've could bind the "name" or the
"location" alone, but i need to add it in the format: "name" - "location"
like "Jonas - Brasil" .

To be honest i found a way of doing it:

var data = new qx.data.store.Json("mydata/url")

data.addListener("loaded", function(e){
 var controller = new qx.data.controller.List(null, list, "name");
 data.bind("model.persons", controller, "model");
 var x = 0;
 var arrayPersons = data.getModel().getLocation();

 controller.setLabelOptions({converter : function(data) {
 return data+" - "+arrayPersons.getItem(x++).getNome().toString();
 }});
});

It works, but it doesn't fells right. xD
There's a better way of doing it? I'm stuck on geting it better for a long
time! i would aprecciate help.

Thanks!
--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/How-to-concat-JSON-s-data-in-a-String-tp5876788p5876788.html
Sent from the qooxdoo mailing list archive at Nabble.com<http://Nabble.com>.

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to