Hi Enes, for Data provided as Map, you have to do 2 things:
1. provide a 'columnIdArr' as 2nd parameter to 'setColumns' 2. set the data via 'setDataAsMapArray' See: http://tinyurl.com/6xrvdpq /Peter On 2011-01-12 09:56 [email protected] wrote: > > Hi Stefan, > > thanks for your tip. > I have some new problems to fill the table with data. > > Webapp return data in json format : > [{"id":1,"alias":"bbb","name":"aaa"},{"id":2,"alias":"bbb","name":"aaa"},{"id":3,"alias":"bbb","name":"aaa"},{"id":4,"alias":"bbb","name":"aaa"}] > > Definition : > qx.Class.define("test.TestModel", > { > extend : qx.ui.table.model.Simple, > > construct : function() { > this.base(arguments); > > var req = new > qx.io.remote.Request("http://localhost:8080/testwebapp", > "GET", "application/json"); > > req.addListener("completed", function(e) { > var myObject = e.getContent(); > this.setData(myObject); > }); > req.addListener("failed", function(e) { > alert("FAILED : " + e.getStatusCode() + " " + > req.getUrl()); > }); > req.addListener("sending", function(e) { > alert("SENDING : "); > }); > req.addListener("receiving", function(e) { > alert("RECEIVING : " + e); > }); > req.addListener("timeout", function(e) { > alert("TIMEOUT : " + e.getStatusCode()); > }); > req.addListener("aborted", function(e) { > alert("ABORTED : " + e); > }); > req.send(); > } > }); > > > Usage : > var tableModel = new test.TestModel(); > tableModel.setColumns([ "ID", "Name", "Alias" ]); > tableModel.setColumnEditable(1, false); > tableModel.setColumnEditable(2, false); > tableModel.setColumnEditable(3, false); > var table = new qx.ui.table.Table(tableModel); > table.getSelectionModel().setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION); > > The problem is that the columns (id, name, alias) are visible but no data is > shown in the table. Does anyone has an idea ? > > Greetings, > Enes ------------------------------------------------------------------------------ Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
